<?php
$bool = false;
$int = 0;
echo 'is ', var_export($bool, true), ' == ', var_export($int, true), ' ? ', var_export($bool == $int, true), "\n";
$bools = (string)$bool;
echo 'is ', var_export($bools, true), ' == ', var_export($bool, true), ' ? ', var_export($bools == $bool, true), "\n";
$ints = (str)$int;
echo 'is ', var_export($ints, true), ' == ', var_export($int, true), ' ? ', var_export($ints == $int, true), "\n";
echo 'is ', var_export($bools, true), ' == ', var_export($ints, true), ' ? ', var_export($bools == $ints, true), "\n";
- Output for 5.4.0 - 5.4.24
- Parse error: syntax error, unexpected '$int' (T_VARIABLE) in /in/2PYb1 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/2PYb1 on line 9
Process exited with code 255.
preferences:
184.03 ms | 1395 KiB | 61 Q