3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(trim(array(1,2,3))); var_dump(trim(2)); var_dump(trim('abc'));
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: trim() expects parameter 1 to be string, array given in /in/VFLm9 on line 2 NULL string(1) "2" string(3) "abc"
Output for 4.3.0 - 5.2.17
Notice: Array to string conversion in /in/VFLm9 on line 2 string(5) "Array" string(1) "2" string(3) "abc"