3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo ('1' === '1' ? 'true' : 'false') . " ('1' == '1')\n"; echo ('2' === '1' ? 'true' : 'false') . " ('2' == '1')\n"; echo ('0' === '0x0' ? 'true' : 'false') . " ('0' == '0x0')\n"; echo ('0' === '00' ? 'true' : 'false') . " ('0' == '00')\n"; echo ('1e1' === '10' ? 'true' : 'false') . " ('1e1' == '10')\n"; echo ('1E1' === '10' ? 'true' : 'false') . " ('1E1' == '10')\n"; echo ('1e-1' === '0.1' ? 'true' : 'false') . " ('1e-1' == '0.1')\n"; echo ('1E-1' === '0.1' ? 'true' : 'false') . " ('1E-1' == '0.1')\n"; echo ('+1' === '1' ? 'true' : 'false') . " ('+1' == '1')\n"; echo ('+0' === '-0' ? 'true' : 'false') . " ('+0' == '-0')\n"; echo ('0.99999999999999994' === '1' ? 'true' : 'false') . " ('0.99999999999999994' == '1')\n"; echo ('0.99999999999999995' === '1' ? 'true' : 'false') . " ('0.99999999999999995' == '1')\n"; echo ("\n1" === '1' ? 'true' : 'false') . " (\"\\n1\" == '1')\n"; echo ("1\n" === '1' ? 'true' : 'false') . " (\"1\\n\" == '1')\n";
based on 2bIUj
Output for 4.3.0 - 7.1.0
true ('1' == '1') false ('2' == '1') false ('0' == '0x0') false ('0' == '00') false ('1e1' == '10') false ('1E1' == '10') false ('1e-1' == '0.1') false ('1E-1' == '0.1') false ('+1' == '1') false ('+0' == '-0') false ('0.99999999999999994' == '1') false ('0.99999999999999995' == '1') false ("\n1" == '1') false ("1\n" == '1')