3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = 'a:2:{i:0;O:9:"exception":1:{s:17:"'."\0".'Exception'."\0".'string";O:9:"exception":1:{s:17:"'."\0".'Exception'."\0".'string";r:2;}}i:1;a:2:{i:0;R:3;i:1;R:4;}}'; $x = unserialize($x); var_dump(count($x[1]));
based on 0VNYe
Output for 5.3.18 - 5.6.28, 7.0.20, 7.1.5 - 7.2.0
int(2)
Output for 7.0.0 - 7.0.6, 7.1.0
int(0)