3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'a:4:{s:20:"option_list_contents";a:3:{s:4:"type";s:6:"master";s:3:"iId";s:1:"1";s:4:"list";a:2:{i:0;a:2:{s:2:"Id";s:4:"Male";s:3:"Val";s:4:"Male";}i:1;a:2:{s:2:"Id";s:6:"Female";s:3:"Val";s:6:"Female";}}}s:4:"size";s:6:"medium";s:16:"default_required";s:3:"Yes";s:14:"field_comments";s:0:"";}'; print_r(unserialize($str)); $str2 = 'a:4:{s:20:"option_list_contents";a:3:{s:4:"type";s:6:"master";s:3:"iId";s:1:"1";s:4:"list";a:2:{i:0;a:2:{s:2:"Id";s:4:"Male";s:3:"Val";s:4:"Male";}i:1;a:2:{s:2:"Id";s:6:"Female";s:3:"Val";s:6:"Female";}}}s:4:"size";s:4:"tiny";s:16:"default_required";s:3:"Yes";s:14:"field_comments";s:0:"";}'; print_r(unserialize($str2));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [option_list_contents] => Array ( [type] => master [iId] => 1 [list] => Array ( [0] => Array ( [Id] => Male [Val] => Male ) [1] => Array ( [Id] => Female [Val] => Female ) ) ) [size] => medium [default_required] => Yes [field_comments] => ) Array ( [option_list_contents] => Array ( [type] => master [iId] => 1 [list] => Array ( [0] => Array ( [Id] => Male [Val] => Male ) [1] => Array ( [Id] => Female [Val] => Female ) ) ) [size] => tiny [default_required] => Yes [field_comments] => )