3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mb_unserialize($string) { $string = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $string); return unserialize($string); } $string = <<<HERE a:1:{i:0;a:15:{s:2:"ID";s:3:"157";s:3:"qty";i:1;s:4:"name";s:21:"?????\?????";s:6:"nameHe";s:21:"?????\?????";s:6:"nameEn";s:21:"?????\?????";s:5:"price";d:80;s:8:"priceNet";d:80;s:10:"priceGross";d:96.7999999999999971578290569595992565155029296875;s:3:"sum";d:80;s:6:"sumNet";d:80;s:8:"sumGross";d:96.7999999999999971578290569595992565155029296875;s:7:"vatRate";d:21;s:3:"vat";d:16.800000000000000710542735760100185871124267578125;s:6:"vatSum";d:16.800000000000000710542735760100185871124267578125;s:4:"hash";s:40:"94d8e389a9617f0adc2cfedb6e0e102155f4ec2f";}} HERE; var_dump(mb_unserialize($string));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/nZ7rF on line 3 Deprecated: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /in/nZ7rF on line 4 bool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
43.74 ms | 402 KiB | 8 Q