3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(~(E_WARNING|E_NOTICE)); var_dump(array('foo', 'bar') === 'baz'); // bool(false) - not equal var_dump(array('foo', 'bar') == 'baz'); // bool(false) - still not equal var_dump(strcmp(array('foo', 'bar'), 'baz')); // NULL... var_dump(strcmp(array('foo', 'bar'), 'baz') == 0); // bool(true) - booby trap! var_dump(strcmp(array('foo', 'bar'), 'baz') === 0); // bool(false) - so far, so good... var_dump(strcmp(array('foo', 'bar'), 'baz') > 0); // bool(false) - okay... var_dump(strcmp(array('foo', 'bar'), 'baz') < 0); // bool(false) - lolphpmanual
Output for 5.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
bool(false) bool(false) NULL bool(true) bool(false) bool(false) bool(false)
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.2.17
bool(false) bool(false) int(-33) bool(false) bool(false) bool(false) bool(true)
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/7Ctvm on line 12
Process exited with code 255.