3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = '0e123'; var_dump($a == 0); var_dump($a == '0'); var_dump($a == "0"); var_dump($a == true); echo "\n"; $_0e; var_dump($a == "$_0e"); var_dump($a == '0.e'); var_dump($a == "0.e"); var_dump($a == '0,e'); var_dump($a == "0,e"); var_dump($a == 0xe); var_dump($a == 0x0e); echo "\nBonus 1:\n"; var_dump($a == '0xe'); var_dump($a == "0xe"); var_dump($a == 0x0); echo "\nBonus 2:\n"; var_dump($a == '0xe0'); var_dump($a == '0x0e'); var_dump($a == ('0' . 'x0e'));
based on d0Dfp
Output for 5.2.1 - 7.2.0
bool(true) bool(true) bool(true) bool(true) Notice: Undefined variable: _0e in /in/AMvRv on line 10 bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) Bonus 1: bool(false) bool(false) bool(true) Bonus 2: bool(false) bool(false) bool(false)
Output for 5.1.0 - 5.2.0
bool(true) bool(true) bool(true) bool(true) Notice: Undefined variable: _0e in /in/AMvRv on line 10 bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) Bonus 1: bool(true) bool(true) bool(true) Bonus 2: bool(true) bool(true) bool(true)
Output for 5.0.4 - 5.0.5
bool(true) bool(true) bool(true) bool(true) Notice: Undefined variable: _0e in /in/AMvRv on line 9 Notice: Undefined variable: _0e in /in/AMvRv on line 10 bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) Bonus 1: bool(true) bool(true) bool(true) Bonus 2: bool(true) bool(true) bool(true)
Output for 4.3.10 - 4.4.9, 5.0.3
bool(true) bool(true) bool(true) bool(true) Notice: Undefined variable: _0e in /in/AMvRv on line 9 Notice: Undefined variable: _0e in /in/AMvRv on line 10 bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) Bonus 1: bool(true) bool(true) bool(true) Bonus 2: bool(true) bool(true) bool(true)
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.2
bool(true) bool(true) bool(true) bool(true) Notice: Undefined variable: _0e in /in/AMvRv on line 9 Notice: Undefined variable: _0e in /in/AMvRv on line 10 bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) Bonus 1: bool(false) bool(false) bool(true) Bonus 2: bool(false) bool(false) bool(false)