3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP $paths = [ '/cars$', '.*/cars$', '^cars/.*/', '/trucks$', '.*/trucks$' ]; $url = 'some-site.com/cars'; foreach($paths AS $v) { if (preg_match('~'.$v.'~', $url)) { echo $v.' matched'; break; } } ?>

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)
8.3.130.0080.00016.57
8.3.120.0080.00817.86
8.3.110.0090.01018.92
8.3.100.0200.00320.36
8.3.90.0160.00221.75
8.3.80.0150.01017.47
8.3.70.0140.00716.71
8.3.60.0250.00717.68
8.3.50.0170.01116.62
8.3.40.0180.00518.16
8.3.30.0150.01118.24
8.3.20.0150.00819.61
8.3.10.0190.00418.20
8.3.00.0180.00719.77
8.2.250.0070.00718.38
8.2.240.0230.00716.97
8.2.230.0180.00219.61
8.2.220.0180.00527.00
8.2.210.0180.00221.45
8.2.200.0090.00616.59
8.2.190.0150.00517.73
8.2.180.0210.00321.09
8.2.170.0230.00520.31
8.2.160.0190.00519.07
8.2.150.0200.00720.85
8.2.140.0170.00921.09
8.2.130.0170.00821.89
8.2.120.0220.00418.71
8.2.110.0170.00918.76
8.2.100.0180.00617.83
8.2.90.0190.00518.48
8.2.80.0210.00817.76
8.2.70.0210.00517.73
8.2.60.0270.00517.49
8.2.50.0190.00717.72
8.2.40.0150.00817.99
8.2.30.0160.00617.80
8.2.20.0160.00717.77
8.2.10.0210.00418.25
8.2.00.0210.00218.49
8.1.300.0190.00917.29
8.1.290.0210.00423.47
8.1.280.0170.01221.08
8.1.270.0190.00719.08
8.1.260.0140.00821.78
8.1.250.0180.00522.73
8.1.240.0190.00819.16
8.1.230.0130.01117.63
8.1.220.0170.00617.59
8.1.210.0130.00918.06
8.1.200.0180.00517.43
8.1.190.0180.00617.32
8.1.180.0190.00817.76
8.1.170.0150.00817.89
8.1.160.0150.00518.13
8.1.150.0120.00917.97
8.1.140.0130.00719.03
8.1.130.0100.00418.77
8.1.120.0150.00317.47
8.1.110.0110.00817.51
8.1.100.0160.00717.40
8.1.90.0100.01517.35
8.1.80.0090.00717.43
8.1.70.0110.00417.38
8.1.60.0210.00217.49
8.1.50.0190.00417.55
8.1.40.0150.00917.38
8.1.30.0210.00317.64
8.1.20.0170.00417.74
8.1.10.0170.00517.53
8.1.00.0170.00817.40
8.0.300.0170.00617.59
8.0.290.0130.01016.66
8.0.280.0140.00817.45
8.0.270.0130.00817.03
8.0.260.0150.00917.54
8.0.250.0080.01016.81
8.0.240.0140.00416.93
8.0.230.0190.00416.79
8.0.220.0140.00516.79
8.0.210.0190.00216.87
8.0.200.0280.00716.96
8.0.190.0200.00816.91
8.0.180.0140.00716.97
8.0.170.0140.00416.74
8.0.160.0170.00416.83
8.0.150.0140.00316.73
8.0.140.0100.00816.73
8.0.130.0130.00415.11
8.0.120.0090.00516.77
8.0.110.0120.00216.76
8.0.100.0130.00116.71
8.0.90.0120.00216.74
8.0.80.0090.00916.81
8.0.70.0110.00416.75
8.0.60.0080.00616.75
8.0.50.0050.00917.53
8.0.30.0170.00216.93
8.0.20.0160.00317.95
8.0.10.0100.00417.83
8.0.00.0110.00716.81
7.4.330.0080.00715.91
7.4.320.0100.00416.46
7.4.300.0090.00316.74
7.4.290.0080.00616.55
7.4.280.0080.00516.57
7.4.270.0110.00216.59
7.4.260.0100.00316.56
7.4.250.0090.00417.30
7.4.240.0110.00317.44
7.4.230.0110.00316.43
7.4.220.0100.00416.38
7.4.210.0100.00816.69
7.4.200.0110.00216.61
7.4.190.0150.00316.52
7.4.180.0180.00016.48
7.4.160.0170.00216.43
7.4.150.0130.00616.30
7.4.140.0150.00316.36
7.4.130.0110.00716.62
7.4.120.0110.00616.53
7.4.110.0140.00316.56
7.4.100.0130.00716.59
7.4.90.0090.01016.47
7.4.80.0130.00717.84
7.4.70.0120.00616.45
7.4.60.0100.00716.48
7.4.50.0130.00416.37
7.4.40.0090.00916.62
7.4.30.0140.00416.49
7.4.20.0190.00016.31
7.4.10.0140.00316.37
7.4.00.0080.00815.54
7.3.330.0120.00114.53
7.3.320.0120.00114.79
7.3.310.0060.00616.19
7.3.300.0100.00216.19
7.3.290.0120.00416.14
7.3.280.0120.00416.20
7.3.270.0180.00016.05
7.3.260.0100.00816.49
7.3.250.0110.00716.01
7.3.240.0110.00916.49
7.3.230.0140.00616.42
7.3.220.0160.00315.98
7.3.210.0160.00216.43
7.3.200.0090.00916.29
7.3.190.0100.00716.45
7.3.180.0120.00916.25
7.3.170.0120.00816.22
7.3.160.0160.00517.09
7.3.150.0190.00017.75
7.3.140.0140.00315.83
7.3.130.0110.00716.15
7.3.120.0110.00715.40
7.3.110.0150.00515.42
7.3.100.0110.00415.53
7.3.90.0110.00415.67
7.3.80.0100.00415.57
7.3.70.0100.00615.70
7.3.60.0090.00515.49
7.3.50.0090.00515.33
7.3.40.0160.00315.47
7.3.30.0100.00715.41
7.3.20.0100.00916.66
7.3.10.0120.00716.64
7.3.00.0100.00616.67
7.2.340.0110.00616.36
7.2.330.0160.00616.33
7.2.320.0110.00516.59
7.2.310.0100.00716.54
7.2.300.0110.00916.50
7.2.290.0140.00516.56
7.2.280.0210.00616.07
7.2.270.0240.00716.30
7.2.260.0280.00616.24
7.2.250.0150.00915.63
7.2.240.0150.00715.55
7.2.230.0160.00915.67
7.2.220.0160.00915.80
7.2.210.0150.00815.67
7.2.200.0140.01115.81
7.2.190.0190.00215.74
7.2.180.0140.00915.57
7.2.170.0170.00815.49
7.2.160.0160.01015.70
7.2.150.0190.00316.60
7.2.140.0200.00716.71
7.2.130.0510.01016.80
7.2.120.0210.00416.75
7.2.110.0180.00816.57
7.2.100.0240.00516.82
7.2.90.0170.00516.55
7.2.80.0230.00616.71
7.2.70.0240.00916.55
7.2.60.0200.00316.75
7.2.50.0160.00516.81
7.2.40.0140.00916.75
7.2.30.0120.00716.73
7.2.20.0120.00916.76
7.2.10.0120.00616.73
7.2.00.0110.00616.93
7.1.330.0110.00316.69
7.1.320.0110.00716.57
7.1.310.0160.00216.58
7.1.300.0100.00816.54
7.1.290.0090.00916.51
7.1.280.0090.01115.54
7.1.270.0100.00815.57
7.1.260.0120.00315.69
7.1.250.0170.00415.47
7.1.240.0230.00416.89
7.1.230.0210.00417.11
7.1.220.0170.00817.20
7.1.210.0270.00017.00
7.1.200.0270.00317.18
7.1.190.0240.00616.97
7.1.180.0230.00817.20
7.1.170.0200.01017.12
7.1.160.0170.01417.00
7.1.150.0240.00716.88
7.1.140.0190.01117.08
7.1.130.0270.00317.05
7.1.120.0300.00417.20
7.1.110.0310.00017.27
7.1.100.0260.00617.18
7.1.90.0250.01116.89
7.1.80.0170.00017.25
7.1.70.0140.00017.02
7.1.60.0150.00917.46
7.1.50.0210.00317.16
7.1.40.0140.00017.28
7.1.30.0110.00317.27
7.1.20.0140.00017.28
7.1.10.0240.00317.23
7.1.00.0160.01316.89

preferences:
29.07 ms | 403 KiB | 5 Q