3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $words = array('systematic', 'سلام','gear','synthesis','mysterious'); $letters=array('s','m', 'e'); foreach ($words as $w) { //print "lets check word $w<br>"; $n=0; foreach ($letters as $l) { if (strpos($w, $l)!==false) $n++; } if ($n>= array_count_values($l)) print "$w<br/>".array_count_values($l)."==="; }
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 systematic<br/>=== Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 سلام<br/>=== Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 gear<br/>=== Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 synthesis<br/>=== Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 Warning: array_count_values() expects parameter 1 to be array, string given in /in/Q3mpv on line 10 mysterious<br/>===
Output for 4.3.2 - 5.2.17
Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 systematic<br/>=== Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 سلام<br/>=== Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 gear<br/>=== Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 synthesis<br/>=== Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values(): The argument should be an array in /in/Q3mpv on line 10 mysterious<br/>===
Output for 4.3.0 - 4.3.1
Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 systematic<br/>=== Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 سلام<br/>=== Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 gear<br/>=== Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 synthesis<br/>=== Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 Warning: array_count_values() [http://www.php.net/function.array-count-values]: The argument should be an array in /in/Q3mpv on line 10 mysterious<br/>===