3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class evil { public function __toString() { global $array; $array[] = 1; $array[] = 1; $array[] = 1; $array[] = 1; return "okey"; } } $array = range(0, 5); $array[1] .= new evil; var_dump($array[1]);
Output for 7.0.0 - 7.2.0
int(1)
Output for 5.5.0 - 5.6.28
string(5) "1okey"