3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public $a; public function __construct($a) { $this->a = $a; } public function __wakeup() { printf("Calling wakeup, a=%d\n", $this->a); if ($this->a === 3) { throw new Exception("wakeup threw exception"); } } } $x = [new A(1), new A(2), new A(3), new A(4), new A(5)]; unserialize(serialize($x));
Output for git.master, git.master_jit, rfc.property-hooks
Calling wakeup, a=1 Calling wakeup, a=2 Calling wakeup, a=3 Fatal error: Uncaught Exception: wakeup threw exception in /in/iXPi6:9 Stack trace: #0 [internal function]: A->__wakeup() #1 /in/iXPi6(15): unserialize('a:5:{i:0;O:1:"A...') #2 {main} thrown in /in/iXPi6 on line 9
Process exited with code 255.

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:
127.25 ms | 406 KiB | 5 Q