3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('aaaaaaaaaa'); echo strlen($a); ?>
Output for 8.1.34, 8.2.30, 8.3.5 - 8.3.30, 8.4.9 - 8.4.17, 8.5.0 - 8.5.2
Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /in/YiJsq:4 Stack trace: #0 {main} thrown in /in/YiJsq on line 4
Process exited with code 255.
Output for 5.6.4
Warning: strlen() expects parameter 1 to be string, array given in /in/YiJsq on line 4

preferences:
67.87 ms | 407 KiB | 5 Q