3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function genPass($length) { $allowed = 'abcdefghijkmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWXYZ!£$%^&*()'; $password = ''; while(strlen($password) < $length) { $password .= substr(mt_rand(0,strlen($allowed)), $allowed, 1); } return $password; } echo genPass(16);<?php
Output for 5.3.0 - 5.5.1
Parse error: syntax error, unexpected '<' in /in/PWsLS on line 12
Process exited with code 255.