3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array("", " ", 0, false, array(), "45"); $r=''; foreach($a as $i => $s) if (trim($s) == "") $r.=$i; echo $r;
based on 4X3ct
Output for 5.3.0 - 7.1.0
Warning: trim() expects parameter 1 to be string, array given in /in/QIj2a on line 4 0134
Output for 4.3.0 - 5.2.17
Notice: Array to string conversion in /in/QIj2a on line 4 013