3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=new GMP(0); $x=$x+1; var_dump($x); var_dump((int)$x); class a { public function __construct($a = null) { $this->a =& $a; } public function __destruct() { $this->a = null; } } $f= new SplFixedArray(5); $a=[$f]; $f[0]=new a($a); echo(serialize([$a])); //var_dump($f);
Output for git.master
object(GMP)#2 (1) { ["num"]=> string(1) "1" } int(1) Deprecated: Creation of dynamic property a::$a is deprecated in /in/7tALg on line 9
Process exited with code 139.
Output for git.master_jit, rfc.property-hooks
object(GMP)#2 (1) { ["num"]=> string(1) "1" } int(1) Deprecated: Creation of dynamic property a::$a is deprecated in /in/7tALg on line 9 a:1:{i:0;a:1:{i:0;O:13:"SplFixedArray":5:{i:0;O:1:"a":1:{s:1:"a";N;}i:1;N;i:2;N;i:3;N;i:4;N;}}}

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