3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [0, 1]; $array2 = [&$array1]; ob_start(function($str) use(&$array1) { static $i = 0; if ($i++ == 4) { unset($array1[0]); unset($array1[1]); } return "$i: $str"; }, 1); var_dump($array2);
Output for git.master, git.master_jit, rfc.property-hooks
1: array(1) { 2: [0]=> 3: 4: &array(2) { 5: [0]=> 6: 7: int(0) 8: [1]=> 9: 10: int(1) 11: 12: } 13: } 14:

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