3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sugar_unserialize($value) { preg_match('/[oc]:\d+:/i', $value, $matches); if (count($matches)) { return false; } return unserialize($value); } $test1 = 'a:1:{i:0;O:8:"stdClass":0:{}}'; $test2 = 'a:1:{i:0;O:+8:"stdClass":0:{}}'; var_dump(sugar_unserialize($test1), sugar_unserialize($test2));
Output for git.master, git.master_jit
Notice: unserialize(): Error at offset 9 of 30 bytes in /in/5vaj9 on line 11 bool(false) bool(false)
Output for rfc.property-hooks
Warning: unserialize(): Error at offset 9 of 30 bytes in /in/5vaj9 on line 11 bool(false) 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:
74.74 ms | 401 KiB | 8 Q