3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { public function __toString() { return 'woo'; } } $c = array('doo', 'foo', 'bloo'); var_dump((string)$c); var_dump((int)$c);
based on lc457
Output for 5.4.9 - 7.3.1
Notice: Array to string conversion in /in/2voYf on line 10 string(5) "Array" int(1)
Output for 5.3.19 - 5.3.29
string(5) "Array" int(1)