3v4l.org

run code in 500+ PHP versions simultaneously
<?php foreach(['-1', '0', '1', '1e10', 'a', 'hello', 1, -1, 0, true, false, 1.0, 0.0, 1.3] as $s) { var_dump($s); var_dump(ctype_digit($s)); $arr[$s] = 1; var_dump(array_key_first($arr)); echo "\n"; }
Output for git.master_jit, rfc.property-hooks, git.master
string(2) "-1" bool(false) int(-1) string(1) "0" bool(true) int(-1) string(1) "1" bool(true) int(-1) string(4) "1e10" bool(false) int(-1) string(1) "a" bool(false) int(-1) string(5) "hello" bool(false) int(-1) int(1) Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) int(-1) int(-1) Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) int(-1) int(0) Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) int(-1) bool(true) Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) int(-1) bool(false) Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) int(-1) float(1) Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) int(-1) float(0) Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) int(-1) float(1.3) Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in /in/vo6gg on line 6 bool(false) Deprecated: Implicit conversion from float 1.3 to int loses precision in /in/vo6gg on line 8 int(-1)

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:
48.21 ms | 2980 KiB | 4 Q