3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = 10; $characters = "0123456789abcdefghijklmnopqrstuvwxyz"; $string = ""; for ($p = 0; $p < $length; $p++) { $string .= $characters[mt_rand(0, strlen($characters)-1)]; echo ($string)
Output for 5.6.38, 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/Z2CVX on line 10
Process exited with code 255.

preferences:
190.25 ms | 1387 KiB | 44 Q