3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paths = [ '/cars$', '.*\/cars$', '^cars\/.*/', '/trucks$', '.*\/trucks$', ]; $paths_string = '#' . implode('|', $paths) . '#'; $current_path = 'cars/honda/'; if (preg_match($paths_string, $current_path)) { echo "it's a match!"; }

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.4.130.0050.00318.75
8.4.120.0130.00724.13
8.4.110.0130.00624.34
8.4.100.0080.01117.96
8.4.90.0100.01020.57
8.4.80.0120.00918.57
8.4.70.0090.00918.85
8.4.60.0110.00520.69
8.4.50.0080.01418.35
8.4.40.0130.00719.78
8.4.30.0100.01020.22
8.4.20.0130.00620.40
8.4.10.0090.00019.63
8.3.260.0100.00916.68
8.3.250.0100.01018.86
8.3.240.0050.01117.22
8.3.230.0050.00316.79
8.3.220.0100.00719.05
8.3.210.0100.00818.46
8.3.200.0050.00416.54
8.3.190.0070.00217.29
8.3.180.0100.00819.16
8.3.170.0110.00718.93
8.3.160.0060.01217.21
8.3.150.0080.00016.60
8.3.140.0040.00416.57
8.3.130.0070.00018.53
8.3.120.0030.00618.96
8.3.110.0060.00316.61
8.3.100.0000.00916.75
8.3.90.0000.00826.77
8.3.80.0060.00316.75
8.3.70.0170.00316.63
8.3.60.0170.00718.53
8.3.50.0110.00417.58
8.3.40.0110.00718.91
8.3.30.0140.00018.79
8.3.20.0080.00021.95
8.3.10.0030.00519.01
8.3.00.0040.00421.89
8.2.290.0040.00516.84
8.2.280.0090.01020.30
8.2.270.0150.00316.89
8.2.260.0040.00417.26
8.2.250.0040.00418.41
8.2.240.0060.00316.64
8.2.230.0130.00320.94
8.2.220.0060.00324.06
8.2.210.0060.00326.77
8.2.200.0030.00716.63
8.2.190.0110.00416.58
8.2.180.0140.00725.92
8.2.170.0140.00722.96
8.2.160.0090.00620.39
8.2.150.0050.00325.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0050.00321.25
8.2.110.0070.00320.35
8.2.100.0060.00618.03
8.2.90.0000.00820.55
8.2.80.0080.00517.97
8.2.70.0040.00417.93
8.2.60.0030.00518.16
8.2.50.0000.00718.10
8.2.40.0050.00319.47
8.2.30.0000.00719.17
8.2.20.0030.00517.96
8.2.10.0000.00818.98
8.2.00.0040.00419.59
8.1.330.0130.00716.36
8.1.320.0140.00616.30
8.1.310.0000.01618.43
8.1.300.0040.00416.35
8.1.290.0040.00730.84
8.1.280.0120.00925.92
8.1.270.0040.00422.04
8.1.260.0050.00326.35
8.1.250.0090.00628.09
8.1.240.0040.00723.95
8.1.230.0110.00020.95
8.1.220.0060.00317.77
8.1.210.0030.00619.02
8.1.200.0040.00417.38
8.1.190.0100.00017.47
8.1.180.0080.00018.10
8.1.170.0000.00818.63
8.1.160.0000.00718.79
8.1.150.0070.00018.92
8.1.140.0000.00718.79
8.1.130.0030.00320.03
8.1.120.0000.00817.66
8.1.110.0070.00017.52
8.1.100.0070.00017.60
8.1.90.0000.00817.59
8.1.80.0000.00717.64
8.1.70.0030.00317.61
8.1.60.0030.00617.64
8.1.50.0000.00817.57
8.1.40.0080.00017.66
8.1.30.0000.01017.64
8.1.20.0000.00817.79
8.1.10.0020.00517.67
8.1.00.0080.00017.62
8.0.300.0040.00420.04
8.0.290.0080.00016.75
8.0.280.0000.00718.43
8.0.270.0070.00017.35
8.0.260.0070.00020.13
8.0.250.0000.00817.09
8.0.240.0060.00017.15
8.0.230.0040.00417.14
8.0.220.0070.00017.10
8.0.210.0000.00716.93
8.0.200.0000.00717.00
8.0.190.0080.00016.94
8.0.180.0040.00416.91
8.0.170.0040.00717.02
8.0.160.0050.00317.06
8.0.150.0000.00717.08
8.0.140.0040.00416.90
8.0.130.0050.00213.50
8.0.120.0050.00217.06
8.0.110.0040.00417.10
8.0.100.0040.00417.07
8.0.90.0040.00416.85
8.0.80.0120.00917.03
8.0.70.0030.00316.94
8.0.60.0040.00416.92
8.0.50.0000.00716.94
8.0.30.0080.00917.33
8.0.20.0080.01116.99
8.0.10.0040.00416.96
8.0.00.0110.00716.92
7.4.330.0000.00415.55
7.4.320.0000.00616.73
7.4.300.0000.00616.59
7.4.290.0070.00016.65
7.4.280.0000.00716.64
7.4.270.0000.00716.76
7.4.260.0000.00816.71
7.4.250.0040.00416.61
7.4.240.0070.00016.75
7.4.230.0030.00316.64
7.4.220.0000.00816.56
7.4.210.0090.00816.65
7.4.200.0030.00316.49
7.4.160.0120.00816.63
7.4.140.0050.01317.86
7.4.130.0100.00716.65
7.4.120.0060.01316.72
7.4.110.0070.01016.52
7.4.100.0100.01016.70
7.4.90.0090.00916.64
7.4.80.0130.01219.39
7.4.70.0130.00316.55
7.4.60.0000.01616.63
7.4.50.0070.01016.83
7.4.40.0110.00616.50
7.4.00.0100.00715.27
7.3.330.0030.00313.19
7.3.320.0000.00613.18
7.3.310.0040.00416.45
7.3.300.0060.00016.38
7.3.290.0070.00016.23
7.3.280.0080.00816.40
7.3.260.0130.00516.45
7.3.240.0090.01016.61
7.3.230.0060.01216.43
7.3.210.0100.00716.61
7.3.200.0060.01516.38
7.3.190.0030.02016.53
7.3.180.0120.00316.73
7.3.170.0030.01416.66
7.3.160.0100.00716.75
7.3.50.0070.00914.77
7.3.40.0100.00014.34
7.3.30.0080.01214.88
7.3.20.0600.00314.60
7.3.10.0180.00714.84
7.3.00.0070.00814.82
7.2.330.0030.01616.87
7.2.320.0040.01316.84
7.2.310.0030.01316.75
7.2.300.0180.00616.85
7.2.290.0040.01216.68
7.2.180.0110.00414.79
7.2.170.0000.01714.88
7.2.160.0080.00815.07
7.2.150.0070.01915.04
7.2.140.0260.00815.28
7.2.130.0110.00615.23
7.2.120.0140.00415.17
7.2.110.0120.01514.76
7.2.100.0120.00614.95
7.2.90.0050.01115.05
7.2.80.0160.00415.21
7.2.70.0100.00715.23
7.2.60.0170.00014.92
7.2.50.0160.00915.17
7.2.40.0130.00915.13
7.2.30.0150.00915.33
7.2.20.0110.01514.86
7.2.10.0120.00915.32
7.2.00.0080.00815.21
7.1.280.0110.01113.95
7.1.270.0120.00613.84
7.1.260.0180.00614.06
7.1.250.0140.00813.79

preferences:
29.87 ms | 403 KiB | 5 Q