3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $row = array( 'useless' => 42, 'useful' => 'orange', 'useless_too' => 'banana', 'useful_too' => 'apples'); foreach ($row as $key){ $pos = strpos($value,'useful'); echo $pos; }
Output for 5.0.4 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Undefined variable: value in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8
Output for hhvm-3.12.0 - 3.13.2
Notice: Undefined variable: value in /in/l6Mso on line 8 Warning: strpos() expects parameter 1 to be string, null given in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8 Warning: strpos() expects parameter 1 to be string, null given in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8 Warning: strpos() expects parameter 1 to be string, null given in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8 Warning: strpos() expects parameter 1 to be string, null given in /in/l6Mso on line 8
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: value in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8 Notice: Undefined variable: value in /in/l6Mso on line 8