3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [null, 0, 100, -1234, 123.456, true, false, new StdClass(), 'test', '']; foreach ($arr as $val) { var_dump($val, strlen($val)); }
Output for git.master, git.master_jit
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/Xklhp on line 5 NULL int(0) int(0) int(1) int(100) int(3) int(-1234) int(5) float(123.456) int(7) bool(true) int(1) bool(false) int(0) Fatal error: Uncaught TypeError: strlen(): Argument #1 ($str) must be of type string, stdClass given in /in/Xklhp:5 Stack trace: #0 {main} thrown in /in/Xklhp on line 5
Process exited with code 255.
Output for rfc.property-hooks
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/Xklhp on line 5 NULL int(0) int(0) int(1) int(100) int(3) int(-1234) int(5) float(123.456) int(7) bool(true) int(1) bool(false) int(0) Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, stdClass given in /in/Xklhp:5 Stack trace: #0 {main} thrown in /in/Xklhp on line 5
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.31 ms | 401 KiB | 8 Q