$empty_Array = []; // returns false, in JS it returns true $test0 = 0; // returns false $test1 = 1; // returns true $string_Zero = '0'; // returns false, in JS it returns true $quotes = ' '; // returns false $null = null; // returns false
if (0) {                            // false same as empty, true same as 1
	echo "true";
} else {
	echo "false";
}
// therefore condition returns false :)
by Luka Khitaridze
2 years ago
PHP
PHP
JS
0
Pro tip: use ```triple backticks around text``` to write in code fences