3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(strlen(new stdClass));
Output for 8.1.18 - 8.1.30, 8.2.5 - 8.2.25, 8.3.0 - 8.3.13
Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, stdClass given in /in/UIYGh:3 Stack trace: #0 {main} thrown in /in/UIYGh on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.17, 8.2.0 - 8.2.4
Fatal error: Uncaught TypeError: strlen(): Argument #1 ($str) must be of type string, stdClass given in /in/UIYGh:3 Stack trace: #0 {main} thrown in /in/UIYGh on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: strlen() expects parameter 1 to be string, object given in /in/UIYGh on line 3 NULL

preferences:
38.68 ms | 409 KiB | 5 Q