3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user = new stdClass(); $user->id = 1; $user->name = 'John Doe'; class Herman { private $milk; public function setMilk($flag) { $this->milk = $flag; } } $hermit = new Herman(); $hermit->setMilk(true); $user->hermit = $hermit; $foobar = array('foo' => 'bar', 'user' => $user); echo serialize($foobar);
Output for git.master, git.master_jit, rfc.property-hooks
a:2:{s:3:"foo";s:3:"bar";s:4:"user";O:8:"stdClass":3:{s:2:"id";i:1;s:4:"name";s:8:"John Doe";s:6:"hermit";O:6:"Herman":1:{s:12:"Hermanmilk";b:1;}}}

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:
32.33 ms | 401 KiB | 8 Q