3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.4.23
Parse error: syntax error, unexpected ';' in /in/UIBH0 on line 9
Process exited with code 255.