3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tests = [ 'one2three', '3blindMice', 'Blind Melon', 'c0lourbl!nd', ]; // I am making a method so your password needs at least one captial and one symbol or number. foreach ($tests as $test) { printf( "%14s: %s\n", $test, preg_match('/(?=.*[A-Z])(?=.*[^a-zA-Z\s])/su', $test) ? 'pass' : 'fail' ); }
Output for 8.1.32 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
one2three: fail 3blindMice: pass Blind Melon: fail c0lourbl!nd: fail

preferences:
66.28 ms | 845 KiB | 4 Q