3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string1 = "-val1(sec1)-"; $string2 = "-val2(sec2)-"; $string3 = "-val3(sec3)-"; $big_string = $string1 . $string2 . $string3; if (preg_match_all('/-([^(]+)\(([^)]+)\)-/', $big_string, $matches, PREG_SET_ORDER)) { $result = array_map(static fn($match) => array_slice($match, 1), $matches); print_r($result); }

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.0160.00418.79
8.4.120.0140.00724.05
8.4.110.0130.00818.51
8.4.100.0130.00818.73
8.4.90.0130.00720.26
8.4.80.0070.01218.75
8.4.70.0120.00918.87
8.4.60.0130.00719.08
8.4.50.0120.00919.48
8.4.40.0070.00317.73
8.4.30.0110.00920.46
8.4.20.0140.00718.13
8.4.10.0100.00019.92
8.3.260.0030.00516.92
8.3.250.0110.00819.07
8.3.240.0080.00317.20
8.3.230.0140.00716.77
8.3.220.0050.00319.05
8.3.210.0080.00618.57
8.3.200.0060.00416.88
8.3.190.0110.00717.31
8.3.180.0100.00516.67
8.3.170.0130.00718.91
8.3.160.0070.01118.74
8.3.150.0060.00320.55
8.3.140.0080.00018.66
8.3.130.0030.00618.47
8.3.120.0070.01120.69
8.3.110.0120.00616.82
8.3.100.0070.00216.85
8.3.90.0080.00026.77
8.3.80.0070.00316.75
8.3.70.0040.01118.30
8.3.60.0120.00918.43
8.3.50.0120.00923.76
8.3.40.0090.00618.75
8.3.30.0070.00718.92
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0150.00320.63
8.2.280.0120.00720.15
8.2.270.0040.01517.26
8.2.260.0090.00620.79
8.2.250.0090.00016.69
8.2.240.0150.00317.32
8.2.230.0070.00420.94
8.2.220.0070.01024.06
8.2.210.0040.00426.77
8.2.200.0040.00416.88
8.2.190.0150.00718.54
8.2.180.0130.00325.92
8.2.170.0120.00618.90
8.2.160.0030.01022.96
8.2.150.0030.00525.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00920.02
8.2.110.0030.00622.37
8.2.100.0100.00718.04
8.2.90.0000.00818.09
8.2.80.0050.00317.97
8.2.70.0000.00917.88
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0030.00520.07
8.2.30.0000.00818.09
8.2.20.0000.00718.00
8.2.10.0090.00019.33
8.2.00.0040.00419.23
8.1.330.0060.00621.89
8.1.320.0060.01016.45
8.1.310.0150.00016.57
8.1.300.0070.00316.21
8.1.290.0000.00930.84
8.1.280.0040.01125.92
8.1.270.0060.00323.90
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00422.66
8.1.230.0070.00422.57
8.1.220.0000.00817.91
8.1.210.0060.00318.82
8.1.200.0030.00617.48
8.1.190.0040.00417.60
8.1.180.0000.00818.10
8.1.170.0000.00718.68
8.1.160.0040.00418.80
8.1.150.0030.00518.91
8.1.140.0040.00718.93
8.1.130.0000.00720.21
8.1.120.0030.00717.62
8.1.110.0000.00817.44
8.1.100.0000.00817.52
8.1.90.0030.00617.58
8.1.80.0060.00317.62
8.1.70.0000.00717.66
8.1.60.0060.00317.65
8.1.50.0000.00817.70
8.1.40.0080.00017.68
8.1.30.0070.00017.85
8.1.20.0090.00317.79
8.1.10.0060.00317.63
8.1.00.0040.00417.50
8.0.300.0040.00420.07
8.0.290.0000.00916.88
8.0.280.0030.00618.47
8.0.270.0030.00318.09
8.0.260.0030.00318.38
8.0.250.0080.00017.03
8.0.240.0000.00717.11
8.0.230.0000.00717.09
8.0.220.0030.00317.04
8.0.210.0000.00716.98
8.0.200.0050.00217.08
8.0.190.0040.00416.97
8.0.180.0040.00416.97
8.0.170.0060.00316.95
8.0.160.0000.00717.11
8.0.150.0000.00817.02
8.0.140.0040.00417.04
8.0.130.0030.00313.52
8.0.120.0040.00416.99
8.0.110.0050.00217.03
8.0.100.0070.00016.82
8.0.90.0040.00417.08
8.0.80.0040.01217.04
8.0.70.0040.00417.09
8.0.60.0050.00316.88
8.0.50.0070.00016.98
8.0.30.0080.00817.32
8.0.20.0170.00317.19
8.0.10.0130.00617.44
8.0.00.0040.01417.29
7.4.330.0020.00315.55
7.4.320.0000.00616.70
7.4.300.0040.00416.68
7.4.290.0030.00316.81
7.4.280.0070.00316.71
7.4.270.0000.00716.71
7.4.260.0000.00613.49
7.4.250.0070.00016.85
7.4.240.0040.00416.74
7.4.230.0030.00316.82
7.4.220.0010.00716.71
7.4.210.0070.01016.76
7.4.200.0050.00316.93
7.4.150.0140.00316.85
7.4.140.0110.00716.50
7.4.130.0180.00016.71
7.4.120.0070.01316.84
7.4.110.0110.00816.77
7.4.100.0060.01116.81
7.4.90.0040.00716.73
7.4.80.0120.00616.50
7.4.70.0080.01116.67
7.4.60.0090.00916.55
7.4.50.0090.00916.60
7.4.40.0120.00616.49
7.4.30.0070.01116.71
7.4.20.0040.01516.43
7.4.10.0070.01316.80
7.4.00.0130.00716.74
7.3.330.0040.00416.03
7.3.320.0030.00313.21
7.3.310.0030.00316.21
7.3.300.0030.00316.21
7.3.290.0080.00716.16
7.3.270.0120.00916.15
7.3.260.0110.00816.07
7.3.250.0100.00716.34
7.3.240.0060.01216.24
7.3.230.0100.00616.29
7.3.220.0100.00616.27
7.3.210.0090.00916.28
7.3.200.0070.01016.32
7.3.190.0120.00616.32
7.3.180.0160.00316.16
7.3.170.0090.00916.11
7.3.160.0120.00616.26
7.3.150.0090.00916.20
7.3.140.0100.00716.35
7.3.130.0100.01015.95
7.3.120.0070.01016.26
7.3.110.0090.00916.13
7.3.100.0090.00916.13
7.3.90.0180.00616.18
7.3.80.0130.00616.18
7.3.70.0100.01316.21
7.3.60.0140.01016.02
7.3.50.0110.01116.00
7.3.40.0080.01216.14
7.3.30.0120.00916.24
7.3.20.0150.00616.15
7.3.10.0070.01016.07
7.3.00.0160.00316.17

preferences:
30.02 ms | 403 KiB | 5 Q