3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $res="{}"; $t=array(1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9); function chercheIndices($val,$t){ for($i=0;$i<count($t);$i++){ if($t[$i]==$val){ $res = $res + "{la valeur}{$t}{est a la case numéro}{$i}{<br/>}"; } } return $res; } chercheIndices(4,$t); ?>
based on 465Aa
Output for 7.1.0 - 7.2.0
Notice: Array to string conversion in /in/DdRYe on line 9 Notice: Undefined variable: res in /in/DdRYe on line 9 Warning: A non-numeric value encountered in /in/DdRYe on line 9 Notice: Array to string conversion in /in/DdRYe on line 9 Warning: A non-numeric value encountered in /in/DdRYe on line 9 Notice: Array to string conversion in /in/DdRYe on line 9 Warning: A non-numeric value encountered in /in/DdRYe on line 9
Output for 5.4.10 - 7.0.20
Notice: Array to string conversion in /in/DdRYe on line 9 Notice: Undefined variable: res in /in/DdRYe on line 9 Notice: Array to string conversion in /in/DdRYe on line 9 Notice: Array to string conversion in /in/DdRYe on line 9
Output for 5.3.20 - 5.3.29
Notice: Undefined variable: res in /in/DdRYe on line 9