3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "AppleCrab13!"; $specialChar= preg_match("/[!@#&*%]+/", $pswd); // at least one $numberChar= preg_match("/\d{2,}/", $pswd); //two or more digits $upperChar= preg_match("/[A-Z]{2,}/", $pswd); //two or more digits echo $specialChar . " " . $numberChar . " " . $upperChar;

preferences:
129.04 ms | 402 KiB | 5 Q