3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public $info; public function __destruct(){ $this->info->func(); } } class B{ public $end; public function __wakeup(){ $this->end = "exit();"; echo '__wakeup'; } public function __call($method, $args){ eval('echo "aaaa";' . $this->end . 'echo "bbb";'); } } $b = new B(); $b->info = new A(); //echo serialize($b); unserialize('O:1:"A":2:{s:4:"info";O:1:"B":1:{s:3:"end";s:10:"phpinfo();";}s:3:"end";s:1:"1";}');
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property B::$info is deprecated in /in/KSB15 on line 21 Deprecated: Creation of dynamic property A::$end is deprecated in /in/KSB15 on line 23 __wakeupaaaa Fatal error: Uncaught Error: Call to a member function func() on null in /in/KSB15:6 Stack trace: #0 [internal function]: A->__destruct() #1 {main} thrown in /in/KSB15 on line 6
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:
152.15 ms | 406 KiB | 5 Q