3v4l.org

run code in 300+ PHP versions simultaneously
<?php function random_password( $length = 8 ) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; $password = substr( str_shuffle( $chars ), 0, $length ); return $password; } foreach ($i = 0 ; $i < 20 ; $i++) { echo random_password()."\n"; }
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.23
Parse error: syntax error, unexpected ';' in /in/UIBH0 on line 9
Process exited with code 255.

preferences:
188.88 ms | 1386 KiB | 60 Q