3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo 'within var_dump: '; var_dump('0010e2' == '1e3'); $a = '0010e2'; $b = '1e3'; var_dump($a); var_dump($b); echo '== :'."\n"; echo 'direct : '; $i = ($a == $b); var_dump($i); echo 'direct strings : '; $i = ((string) $a == (string) $b); var_dump($i); echo 'string in var_dump: '; var_dump((string) $a == (string) $b); echo 'within var_dump: '; var_dump($a == $b); echo '=== :'."\n"; $i = (bool)((string) $a === (string) $b); var_dump($i); var_dump((string) '0010e2' === (string) '1e3'); echo '-'."\n";
based on jmBeq
Output for 4.3.0 - 7.2.0
within var_dump: bool(true) string(6) "0010e2" string(3) "1e3" == : direct : bool(true) direct strings : bool(true) string in var_dump: bool(true) within var_dump: bool(true) === : bool(false) bool(false) -