3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "this is school of sachin"; $pattern = "sch"; $b = explode(' ',$a); $b = array_reverse($b); for($i=0;$i < count($b);$i++){ if(strpos($b[$i]) !== false){ echo $i+1; } } ?>
Output for 5.3.0 - 7.1.0
Warning: strpos() expects at least 2 parameters, 1 given in /in/Ke6BU on line 7 1 Warning: strpos() expects at least 2 parameters, 1 given in /in/Ke6BU on line 7 2 Warning: strpos() expects at least 2 parameters, 1 given in /in/Ke6BU on line 7 3 Warning: strpos() expects at least 2 parameters, 1 given in /in/Ke6BU on line 7 4 Warning: strpos() expects at least 2 parameters, 1 given in /in/Ke6BU on line 7 5
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for strpos() in /in/Ke6BU on line 7 1 Warning: Wrong parameter count for strpos() in /in/Ke6BU on line 7 2 Warning: Wrong parameter count for strpos() in /in/Ke6BU on line 7 3 Warning: Wrong parameter count for strpos() in /in/Ke6BU on line 7 4 Warning: Wrong parameter count for strpos() in /in/Ke6BU on line 7 5