3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ValidateForms{ # Min and Max values for username and passoword const MIN_USERNAME = 4; const MAX_USERNAME = 20; const MIN_PASSWORD = 8; const MAX_PASSWORD = 40; # Regex const REGEX_USERNAME = "/^[A-z0-9_]{" . self::MIN_USERNAME . "," . self::MAX_USERNAME .'}$/'; const REGEX_PASSWORD = "/^[A-z0-9_\\\*\-]{" . self::MIN_PASSWORD . "," . self::MAX_PASSWORD .'}$/'; public static $errors = array( 'username' => array(false, "Invalid username: it must have between " . self::MIN_USERNAME . " and " . self::MAX_USERNAME . " chars."), 'password' => array(false, "Invalid password: it must have between self::MIN_PASSWORD and self::MAX_PASSWORD chars and special chars.") ); } print_r(ValidateForms::$errors); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [username] => Array ( [0] => [1] => Invalid username: it must have between 4 and 20 chars. ) [password] => Array ( [0] => [1] => Invalid password: it must have between self::MIN_PASSWORD and self::MAX_PASSWORD chars and special chars. ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
62.34 ms | 401 KiB | 8 Q