3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = "a:3:{i:0;i:35928;i:1;i:36158;i:2;i:36164;}"; $b = unserialize($a); var_dump($b); $c = [35928, 36164]; echo serialize($c);
based on IvogP
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
array(3) { [0]=> int(35928) [1]=> int(36158) [2]=> int(36164) } a:2:{i:0;i:35928;i:1;i:36164;}