3v4l.org

run code in 300+ PHP versions simultaneously
<?php // classa.inc: class A { public $one = 1; public function show_one() { echo $this->one; } } // page1. $a = new A; $s = serialize($a); // store $s somewhere where page2.php can find it. file_put_contents('store', $s); // page2.php: // this is needed for the unserialize to work properly. $s = file_get_contents('store'); $a = unserialize($s); // now use the function show_one() of the $a object. $a->show_one(); ?>
Output for git.master, git.master_jit
Warning: file_put_contents(): open_basedir restriction in effect. File(store) is not within the allowed path(s): (/tmp:/in:/etc) in /in/sp51Z on line 17 Warning: file_put_contents(store): Failed to open stream: Operation not permitted in /in/sp51Z on line 17 Warning: file_get_contents(): open_basedir restriction in effect. File(store) is not within the allowed path(s): (/tmp:/in:/etc) in /in/sp51Z on line 24 Warning: file_get_contents(store): Failed to open stream: Operation not permitted in /in/sp51Z on line 24 Fatal error: Uncaught Error: Call to a member function show_one() on bool in /in/sp51Z:28 Stack trace: #0 {main} thrown in /in/sp51Z on line 28
Process exited with code 255.
Output for rfc.property-hooks
Warning: file_put_contents(): open_basedir restriction in effect. File(store) is not within the allowed path(s): (/tmp:/in:/etc) in /in/sp51Z on line 17 Warning: file_put_contents(store): Failed to open stream: Operation not permitted in /in/sp51Z on line 17 Warning: file_get_contents(): open_basedir restriction in effect. File(store) is not within the allowed path(s): (/tmp:/in:/etc) in /in/sp51Z on line 24 Warning: file_get_contents(store): Failed to open stream: Operation not permitted in /in/sp51Z on line 24 Fatal error: Uncaught Error: Call to a member function show_one() on false in /in/sp51Z:28 Stack trace: #0 {main} thrown in /in/sp51Z on line 28
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:
38.69 ms | 401 KiB | 8 Q