3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [3,4,5,6,7,1,2,3]; $a = 50; $pos = array_search(max($arr), $b); var_dump($b);
based on PWE5r
Output for 5.4.8 - 7.2.0
Notice: Undefined variable: b in /in/Xlf7R on line 5 Warning: array_search() expects parameter 2 to be array, null given in /in/Xlf7R on line 5 Notice: Undefined variable: b in /in/Xlf7R on line 7 NULL
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Xlf7R on line 3
Process exited with code 255.