3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function match_str($cellItemName,$dbItemArray) { echo $dbItemArray[3]; $count=0; $len=sizeof($dbItemArray); for($i=0;$i<$len;$i++) { if(stristr($dbItemArray[i],$cellItemName)){ $count=1; break; } echo $count; } die; if($count==1) { return 1; } else { return 0; } } $result = match_str("2 php developer $150","php developer") ?>
Output for 7.2.0
Warning: sizeof(): Parameter must be an array or an object that implements Countable in /in/6dhWn on line 6 Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /in/6dhWn on line 9 Warning: Illegal string offset 'i' in /in/6dhWn on line 9 0
Output for 5.4.0 - 7.1.10
Notice: Use of undefined constant i - assumed 'i' in /in/6dhWn on line 9 Warning: Illegal string offset 'i' in /in/6dhWn on line 9 0
Output for 4.3.0 - 5.3.29
Notice: Use of undefined constant i - assumed 'i' in /in/6dhWn on line 9 0