3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v1 = 5; $v2 = '5-4'; echo (strcmp($v1,$v2) === 0 ? 'they are the same' : 'they aren\'t the same'); echo "\n"; echo (string $v1 == string $v2 ? 'they are the same' : 'they aren\'t the same'); echo "\n"; echo ($v1 === $v2 ? 'they are the same' : 'they aren\'t the same');
Output for 5.4.0 - 5.4.8
Parse error: syntax error, unexpected '$v1' (T_VARIABLE) in oJNmC on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.18
Parse error: syntax error, unexpected T_VARIABLE in oJNmC on line 7
Process exited with code 255.

preferences:
170.92 ms | 1399 KiB | 35 Q