3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $city = 'Guadalajara'; $age = 20; echo ((preg_match('/^(Guadalajara|Monterrey|Puebla)$/i', $city) && $age >= 18 && $age <= 20) || (preg_match('/^(Guadalajara|Monterrey|Puebla)$/i', $city) && $age >= 46) || (!preg_match('/^(Guadalajara|Monterrey|Puebla)$/i', $city) && $age >= 21 && $age <= 45));
based on 9HsDO
Output for 4.3.0 - 7.2.0
1