3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); echo "Testing case 1\n"; foreach ($array as $key => $value) { unset($aarray[$kkey+1]); echo sprintf("on %s, we removed %s\n, current size is %d", $key, $key+1, count($array)); } echo "Testing case 2\n"; foreach ((array) $array as $key => $value) { unset($aarray[$key+1]); echo sprintf("on %s, we removed %s\n, current size is %d", $key, $key+1, count($array)); }
Output for git.master, git.master_jit, rfc.property-hooks
Testing case 1 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 0, we removed 1 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 1, we removed 2 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 2, we removed 3 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 3, we removed 4 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 4, we removed 5 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 5, we removed 6 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 6, we removed 7 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 7, we removed 8 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 8, we removed 9 , current size is 10 Warning: Undefined variable $kkey in /in/7JUOp on line 8 Warning: Undefined variable $aarray in /in/7JUOp on line 8 on 9, we removed 10 , current size is 10Testing case 2 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 0, we removed 1 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 1, we removed 2 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 2, we removed 3 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 3, we removed 4 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 4, we removed 5 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 5, we removed 6 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 6, we removed 7 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 7, we removed 8 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 8, we removed 9 , current size is 10 Warning: Undefined variable $aarray in /in/7JUOp on line 15 on 9, we removed 10 , current size is 10

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.77 ms | 409 KiB | 8 Q