3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'barValue'; protected $baz = 'bazValue'; private $tab = 'tabValue'; } $F = new Foo(); $F = serialize($F); $F = str_replace('tabValue','new_tabValue',$F); preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $F); $F = unserialize($F); var_dump($F);
Output for git.master, git.master_jit
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/hYju4 on line 12 Notice: unserialize(): Error at offset 94 of 101 bytes in /in/hYju4 on line 13 bool(false)
Output for rfc.property-hooks
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/hYju4 on line 12 Warning: unserialize(): Error at offset 94 of 101 bytes in /in/hYju4 on line 13 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:
41.56 ms | 401 KiB | 8 Q