3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keys = array(0, "", "0", 0.0, false, null, array()); foreach ($keys as $key) { $array = array($key => "foo"); var_dump($key); var_dump(key($array)); var_dump(isset($array[$key])); var_dump(array_key_exists($key, $array)); echo "\n"; }
Output for git.master, git.master_jit
int(0) int(0) bool(true) bool(true) string(0) "" string(0) "" bool(true) bool(true) string(1) "0" int(0) bool(true) bool(true) float(0) int(0) bool(true) bool(true) bool(false) int(0) bool(true) bool(true) NULL string(0) "" bool(true) bool(true) Fatal error: Uncaught TypeError: Illegal offset type in /in/vltnn:4 Stack trace: #0 {main} thrown in /in/vltnn on line 4
Process exited with code 255.
Output for rfc.property-hooks
int(0) int(0) bool(true) bool(true) string(0) "" string(0) "" bool(true) bool(true) string(1) "0" int(0) bool(true) bool(true) float(0) int(0) bool(true) bool(true) bool(false) int(0) bool(true) bool(true) NULL string(0) "" bool(true) bool(true) Fatal error: Uncaught TypeError: Cannot access offset of type array on array in /in/vltnn:4 Stack trace: #0 {main} thrown in /in/vltnn on line 4
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:
36.1 ms | 401 KiB | 8 Q