<?php
$bool = false;
$int = 0;
echo 'is ', var_export($bool, true), ' == ', var_export($int, true), ' ? ', var_export($bool == $int), "\n";
$bools = (string)$bool;
echo 'is ', var_export($bools, true), ' == ', var_export($bool, true), ' ? ', var_export($bools == $bool), "\n";
$ints = (str)$int;
echo 'is ', var_export($ints, true), ' == ', var_export($int, true), ' ? ', var_export($ints == $int), "\n";
echo 'is ', var_export($bools, true), ' == ', var_export($ints, true), ' ? ', var_export($bools == $ints), "\n";
- Output for 5.4.0 - 5.4.24, 5.5.0 - 5.5.8
- Parse error: syntax error, unexpected '$int' (T_VARIABLE) in /in/6K31F on line 9
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_VARIABLE in /in/6K31F on line 9
Process exited with code 255.
preferences:
179.07 ms | 1395 KiB | 70 Q