3v4l.org

run code in 200+ 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 - 7.2.11
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"