3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(trim(strval(array(1,2,3)))); var_dump(trim(2)); var_dump(trim('abc'));
Output for 4.3.0 - 4.3.11, 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/RpdhK on line 2 string(5) "Array" string(1) "2" string(3) "abc"
Output for 4.4.0 - 5.3.29
string(5) "Array" string(1) "2" string(3) "abc"