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 == 0x0); var_dump($a == true); echo "\n"; $b=1; var_dump($a == "$b"); var_dump($a == $b); echo "\n"; var_dump($a == trim($a)); echo "\n"; var_dump($a == '0xe'); var_dump($a == "0xe"); echo "\n"; var_dump($a == '0xe0'); var_dump($a == '0x0e'); var_dump($a == ('0' . 'x0e'));
based on L7UUm
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.2, 5.2.1 - 7.2.0
bool(true) bool(true) bool(true) bool(true) bool(false) bool(false) bool(true) bool(false) bool(false) bool(false) bool(false) bool(false)
Output for 4.3.10 - 4.4.9, 5.0.3 - 5.2.0
bool(true) bool(true) bool(true) bool(true) bool(false) bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true)