run code in 150+ php & hhvm versions
Bugs & Features
<?php function truthy($value){ return in_array($value, array(true,1,'y','yes','true'), true); } var_dump(truthy('n')); var_dump(truthy('yes')); var_dump(truthy('no')); var_dump(truthy('false')); var_dump(truthy(false));
based on KKBDf
Output for 4.3.0 - 5.6.21, 7.0.0 - 7.1.0RC3
bool(false) bool(true) bool(false) bool(false) bool(false)
Output for hhvm-3.12.0

Process exited with code 137.
Output for hhvm-3.10.0

Process exited with code 153.