3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = 'a:3:{i:0;O:9:"exception":1:{s:16:"'."\0".'Exception'."\0".'trace";s:4:"test";}i:1;r:3;i:2;r:4;}'; $x = unserialize($x); for ($i = 0; $i < 5; $i++) { $v[$i] = 'hi'.$i; } var_dump($x[1]);
based on 6ujWK
Output for 5.4.20 - 5.6.28, 7.0.20, 7.1.5 - 7.2.0
string(4) "test"
Output for 5.3.18 - 5.4.19, 7.0.3 - 7.0.6, 7.1.0
Notice: unserialize(): Error at offset 80 of 81 bytes in /in/hlZVM on line 4 NULL
Output for 7.0.0 - 7.0.2
Notice: Undefined offset: 1 in /in/hlZVM on line 10 NULL