3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $gender = array('Ladies', 'Bad Girl'); if (strstr($product_name, $gender) !== false) { echo 'Junior'; } else { echo 'Adult'; } ?>
Output for 5.3.1 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: product_name in /in/bIV5f on line 1 Warning: strstr(): needle is not a string or an integer in /in/bIV5f on line 1 Adult
Output for hhvm-3.12.0
Notice: Undefined variable: product_name in /in/bIV5f on line 1 Warning: strstr() expects parameter 1 to be string, null given in /in/bIV5f on line 1 Junior
Output for 5.0.4 - 5.3.0, hhvm-3.10.0
Notice: Undefined variable: product_name in /in/bIV5f on line 1 Adult
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: product_name in /in/bIV5f on line 1 Adult