3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((str) '0XBAD' == (str) '2989'); if((string) '0XBAD' == (string) '2989') { echo "PHP suckz"; } else { echo "PHP rulez"; }
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected ''0XBAD'' (T_CONSTANT_ENCAPSED_STRING) in /in/g5YZD on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/g5YZD on line 2
Process exited with code 255.

preferences:
185.31 ms | 1395 KiB | 51 Q