3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = null; // initialise an array with reference set $s = 'some string'; $a[] =& $s; $a[] =& $s; $a[] =& $s; $s =& $n; // so the reference count is clear debug_zval_dump($a); var_dump(apc_store('a', $a)); $a = apc_fetch('a'); // modifiy it $s =& $a[0]; $s = 'other string'; $s = & $n; debug_zval_dump($a);
Output for git.master, rfc.property-hooks
array(3) refcount(2){ [0]=> reference refcount(3) { string(11) "some string" interned } [1]=> reference refcount(3) { string(11) "some string" interned } [2]=> reference refcount(3) { string(11) "some string" interned } } Fatal error: Uncaught Error: Call to undefined function apc_store() in /in/mK0Xq:12 Stack trace: #0 {main} thrown in /in/mK0Xq on line 12
Process exited with code 255.
Output for git.master_jit
array(3) refcount(2){ [0]=> reference refcount(3) { string(11) "some string" refcount(2) } [1]=> reference refcount(3) { string(11) "some string" refcount(2) } [2]=> reference refcount(3) { string(11) "some string" refcount(2) } } Fatal error: Uncaught Error: Call to undefined function apc_store() in /in/mK0Xq:12 Stack trace: #0 {main} thrown in /in/mK0Xq on line 12
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:
49.22 ms | 401 KiB | 8 Q