3v4l.org

run code in 300+ PHP versions simultaneously
<?php function index() { $a = 2; $b = 8; $arr[] = $a; $arr[] = &$a; $arr[] = $a; dmp($arr); $arr[1] = $b; echo $a.PHP_EOL; dmp($arr); $a++; $b++; echo $a.PHP_EOL; dmp($arr); } function dmp($val) { echo '<pre>'; var_dump($val); echo '</pre>'; } index();
Output for git.master, git.master_jit, rfc.property-hooks
<pre>array(3) { [0]=> int(2) [1]=> &int(2) [2]=> int(2) } </pre>8 <pre>array(3) { [0]=> int(2) [1]=> &int(8) [2]=> int(2) } </pre>9 <pre>array(3) { [0]=> int(2) [1]=> &int(9) [2]=> int(2) } </pre>

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:
61.34 ms | 1491 KiB | 4 Q