3v4l.org

run code in 200+ 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 - 7.2.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 5.0.4 - 5.3.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