3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = array('aaaaaaaaaa'); echo strlen($a); ?>
Output for 8.1.34, 8.2.30 - 8.2.31, 8.3.5 - 8.3.31, 8.4.9 - 8.4.22, 8.5.0 - 8.5.7
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:
51.23 ms | 586 KiB | 4 Q