3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $password = 'Exalog1`'; $pattern = "/(?(?=(.*[A-Z]){1,}))(?(?=(.*[0-9]){1,}))(?(?=(.*[\W]){1,}))(?(?=(.*[a-z]){1,}))(?i:(?(?=(.*data){1,})))(?(?=(.){8,}))/"; preg_match($pattern, $password, $result); var_dump($result); ?>
based on m66O6
Output for 5.3.19 - 5.3.29, 5.4.9 - 7.2.0
array(7) { [0]=> string(0) "" [1]=> string(1) "E" [2]=> string(7) "Exalog1" [3]=> string(8) "Exalog1`" [4]=> string(6) "Exalog" [5]=> string(0) "" [6]=> string(1) "`" }
Output for 4.3.0 - 5.3.18, 5.4.0 - 5.4.8
array(1) { [0]=> string(0) "" }