3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(); echo PHP_EOL . ' on empty array: ' . PHP_EOL; var_dump(key($array)); $array[] = 'f'; echo PHP_EOL . ' size one array: ' . PHP_EOL; var_dump(key($array)); echo PHP_EOL . ' within loop: ' . PHP_EOL; foreach ($array as $item) { var_dump(key($array)); } echo PHP_EOL . ' after loop: ' . PHP_EOL; var_dump(key($array)); reset($array); echo PHP_EOL . ' after reset: ' . PHP_EOL; var_dump(key($array)); end($array); echo PHP_EOL . ' after end: ' . PHP_EOL; var_dump(key($array));
Output for git.master, git.master_jit, rfc.property-hooks
on empty array: NULL size one array: int(0) within loop: int(0) after loop: int(0) after reset: int(0) after end: int(0)

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