3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.80.0130.03020.51
5.5.240.0030.04320.26
5.4.400.4300.03319.15
5.4.390.4170.04019.12
5.4.380.3400.03718.94
5.4.370.3670.03019.11
5.4.360.3600.04019.18
5.4.350.3030.04318.97
5.4.340.3130.04019.13
5.4.320.4070.03719.15
5.4.310.4030.03719.14
5.4.300.4500.03018.95
5.4.290.4600.03319.10
5.4.280.4570.04019.10
5.4.270.4630.03718.98
5.4.260.4330.03019.24
5.4.250.4130.03719.16
5.4.240.4000.04319.06
5.4.230.3830.04018.94
5.4.220.4130.03319.10
5.4.210.3870.03719.16
5.4.200.4570.04019.05
5.4.190.4370.03719.12
5.4.180.4400.03719.23
5.4.170.4600.03319.02
5.4.160.4300.04319.15
5.4.150.4230.04019.21
5.4.140.4200.03016.49
5.4.130.3970.03716.35
5.4.120.4230.04716.46
5.4.110.3600.03716.26
5.4.100.3900.03716.26
5.4.90.3930.03716.52
5.4.80.3900.03716.54
5.4.70.4600.03016.52
5.4.60.4570.03316.45
5.4.50.4170.03716.50
5.4.40.4300.03716.49
5.4.30.4100.03716.50
5.4.20.4600.03716.48
5.4.10.4600.03016.22
5.4.00.4570.04015.98
5.3.290.4170.04014.65
5.3.280.3570.03714.53
5.3.270.4700.03314.55
5.3.260.4430.04014.55
5.3.250.4100.03014.54
5.3.240.4000.04014.54
5.3.230.4400.04014.69
5.3.220.4370.04014.36
5.3.210.4070.03314.52
5.3.200.3670.04314.50
5.3.190.3870.03714.47
5.3.180.3700.04014.52
5.3.170.4200.03714.50
5.3.160.4430.04014.45
5.3.150.4230.03314.66
5.3.140.4570.03714.50
5.3.130.4600.03714.49
5.3.120.4630.03714.48
5.3.110.4630.04014.43
5.3.100.4570.03314.05
5.3.90.4530.04013.97
5.3.80.4600.03313.96
5.3.70.4470.03313.98
5.3.60.4130.04313.84
5.3.50.4530.03714.04
5.3.40.4130.03013.90
5.3.30.3700.03313.84
5.3.20.4470.03713.62
5.3.10.0100.06713.60
5.3.00.0100.06713.56
5.2.170.3900.02311.00
5.2.160.3500.02711.12
5.2.150.3170.02311.05
5.2.140.3170.03311.13
5.2.130.3800.03011.04
5.2.120.0570.05311.00
5.2.110.0030.06310.92
5.2.100.3900.03010.99
5.2.90.3500.03010.98
5.2.80.3800.03710.97
5.2.70.3930.03311.08
5.2.60.3630.03011.02
5.2.50.3470.03310.84
5.2.40.2670.02710.82
5.2.30.2700.03011.05
5.2.20.2600.02710.94
5.2.10.2700.02710.87
5.2.00.2630.03010.72
5.1.60.2930.02010.00
5.1.50.2970.0209.94
5.1.40.3070.03710.04
5.1.30.2830.02710.40
5.1.20.2200.02710.31
5.1.10.2270.02310.07
5.1.00.2730.03010.11
5.0.50.1230.0208.59
5.0.40.0130.0238.36
5.0.30.0000.0308.13
5.0.20.0000.0408.19
5.0.10.0000.0208.07
5.0.00.0030.0308.15
4.4.90.1800.0206.36
4.4.80.1570.0206.36
4.4.70.1430.0176.36
4.4.60.1330.0106.36
4.4.50.1300.0136.36
4.4.40.1530.0306.36
4.4.30.1730.0136.36
4.4.20.0930.0136.36
4.4.10.0970.0176.36
4.4.00.1200.0276.36
4.3.110.0000.0176.36
4.3.100.0070.0206.36
4.3.90.0000.0136.36
4.3.80.0000.0236.36
4.3.70.0000.0136.36
4.3.60.0070.0106.36
4.3.50.0670.0106.36
4.3.40.1500.0206.36
4.3.30.0330.0136.36
4.3.20.0670.0106.36
4.3.10.0600.0176.36
4.3.00.0600.0176.36

preferences:
149 ms | 1394 KiB | 7 Q