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:10:{s:4:"type";s:5:"table";s:3:"iId";s:1:"6";s:10:"table_name";s:11:"mod_country";s:9:"field_key";s:10:"iCountryId";s:9:"field_val";a:2:{s:4:"list";a:1:{i:0;s:8:"vCountry";}s:9:"separator";a:1:{i:0;s:0:"";}}s:5:"where";s:0:"";s:11:"order_field";s:0:"";s:8:"order_by";s:3:"ASC";s:12:"parent_child";s:2:"No";s:10:"parent_src";s:2:"No";}s:4:"size";s:6:"medium";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] => table [iId] => 6 [table_name] => mod_country [field_key] => iCountryId [field_val] => Array ( [list] => Array ( [0] => vCountry ) [separator] => Array ( [0] => ) ) [where] => [order_field] => [order_by] => ASC [parent_child] => No [parent_src] => No ) [size] => medium [default_required] => Yes [field_comments] => )