3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str1 = '57 channels'; $str2 = '1/2 a pack of cigarettes'; $str3 = '0x10'; if ($str1 == 57) { echo 'a'; } else { echo 'b'; } if ($str2 == 0.5) { echo 'c'; } else if ($str2 == 1) { echo 'd'; } else { echo 'e'; } if ($str3 == 0) { echo 'f'; } else if ($str3 == 16) { echo 'g'; } // 0x10 is 16 in decimal else if ($str3 == 0x10) { echo 'h'; } ?>
Output for 7.0.0 - 7.1.0
adf
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
adg