3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['a', 'b', 'c']; var_dump(current($arr)); echo '--------aaaaaa--------', PHP_EOL; var_dump(end($arr)); var_dump(next($arr)); $abc = $arr; echo '--------bbbbbbb--------', PHP_EOL; var_dump(current($abc)); // false var_dump(current($abc)); // false var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? echo '--------cccccccc--------', PHP_EOL;
Output for git.master, git.master_jit
string(1) "a" --------aaaaaa-------- string(1) "c" bool(false) --------bbbbbbb-------- bool(false) bool(false) Fatal error: Uncaught Error: Call to undefined function each() in /in/dGZbf:14 Stack trace: #0 {main} thrown in /in/dGZbf on line 14
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:
13.51 ms | 409 KiB | 5 Q