3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "lorem ipsum <foo=42> dolor sit <bar=[17]> amet consectepture <foo=[37]> adipisicing elit <bar=19> sed do eiusmod"; $re = '/(?J)<%{name}=(?(?P<value>\\d+)|\\[(?P<value>\\d+)\\])>/'; foreach (array("foo", "bar") as $name) { echo $name, ": "; if (false !== preg_match(str_replace("%{name}", $name, $re), $string, $m)) { var_dump($m['value']); } else { echo "<FALSE>\n"; } }

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.60.0030.01416.88
8.3.50.0240.01121.21
8.3.40.0110.00718.71
8.3.30.0030.01018.97
8.3.20.0040.00420.34
8.3.10.0040.00423.48
8.3.00.0040.00419.38
8.2.180.0150.00716.63
8.2.170.0140.00722.96
8.2.160.0070.00720.38
8.2.150.0000.01924.18
8.2.140.0050.00324.66
8.2.130.0060.00326.16
8.2.120.0000.00722.19
8.2.110.0030.00722.09
8.2.100.0060.00617.78
8.2.90.0000.00719.23
8.2.80.0040.00418.03
8.2.70.0040.00417.48
8.2.60.0000.00817.80
8.2.50.0050.00318.07
8.2.40.0040.00419.95
8.2.30.0000.00719.74
8.2.20.0030.00517.80
8.2.10.0000.00717.95
8.2.00.0070.00417.72
8.1.280.0100.00325.92
8.1.270.0030.00523.83
8.1.260.0100.00726.35
8.1.250.0000.00828.09
8.1.240.0040.00423.88
8.1.230.0110.00019.08
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0070.00317.22
8.1.190.0000.00817.40
8.1.180.0000.00818.10
8.1.170.0050.00318.46
8.1.160.0000.00721.95
8.1.150.0070.00418.65
8.1.140.0050.00217.27
8.1.130.0060.00017.73
8.1.120.0040.00417.41
8.1.110.0000.00817.29
8.1.100.0040.00417.42
8.1.90.0000.00817.35
8.1.80.0090.00017.42
8.1.70.0000.00717.39
8.1.60.0000.00817.54
8.1.50.0000.00817.50
8.1.40.0040.00417.43
8.1.30.0000.00817.44
8.1.20.0000.00717.62
8.1.10.0080.00017.45
8.1.00.0050.00317.38
8.0.300.0040.00718.77
8.0.290.0030.00517.16
8.0.280.0070.00018.32
8.0.270.0000.00717.19
8.0.260.0000.00617.26
8.0.250.0000.00617.04
8.0.240.0000.00717.04
8.0.230.0000.00716.94
8.0.220.0050.00216.81
8.0.210.0000.00816.86
8.0.200.0000.00616.93
8.0.190.0040.00416.87
8.0.180.0000.00716.91
8.0.170.0020.00516.96
8.0.160.0000.01016.92
8.0.150.0000.00816.94
8.0.140.0040.00416.88
8.0.130.0000.00613.34
8.0.120.0040.00416.82
8.0.110.0000.00816.86
8.0.100.0040.00416.77
8.0.90.0040.00416.77
8.0.80.0060.01016.85
8.0.70.0050.00216.93
8.0.60.0040.00416.86
8.0.50.0070.00016.77
8.0.30.0070.01217.20
8.0.20.0090.01017.40
8.0.10.0040.00417.05
8.0.00.0080.01216.83
7.4.330.0000.00515.16
7.4.320.0030.00316.67
7.4.300.0000.00716.70
7.4.290.0000.00716.68
7.4.280.0070.00016.42
7.4.270.0000.00816.60
7.4.260.0070.00016.51
7.4.250.0080.00016.50
7.4.240.0000.00716.63
7.4.230.0070.00016.63
7.4.220.0130.00316.69
7.4.210.0070.00916.65
7.4.200.0050.00216.56
7.4.190.0030.00316.85
7.4.160.0100.00516.68
7.4.150.0090.00917.40
7.4.140.0100.01317.86
7.4.130.0110.01016.69
7.4.120.0060.01216.62
7.4.110.0080.00916.67
7.4.100.0110.00716.49
7.4.90.0160.00616.82
7.4.80.0050.01319.39
7.4.70.0140.00716.73
7.4.60.0070.01016.56
7.4.50.0030.00616.63
7.4.40.0060.00922.77
7.4.30.0080.00816.57
7.4.00.0080.00914.90
7.3.330.0000.00613.21
7.3.320.0050.00013.12
7.3.310.0000.00716.46
7.3.300.0050.00316.42
7.3.290.0070.00716.43
7.3.280.0060.01016.37
7.3.270.0090.00917.40
7.3.260.0070.01016.50
7.3.250.0140.00716.66
7.3.240.0180.00016.36
7.3.230.0070.01016.42
7.3.210.0000.01716.69
7.3.200.0100.01019.39
7.3.190.0090.01316.77
7.3.180.0160.00016.73
7.3.170.0100.00616.55
7.3.160.0030.01216.70
7.3.120.0060.00914.78
7.3.110.0120.00414.87
7.3.100.0060.01315.23
7.3.90.0090.00314.74
7.3.80.0120.00314.84
7.3.70.0040.01415.04
7.3.60.0000.01514.95
7.3.50.0060.00614.70
7.3.40.0100.00714.90
7.3.30.0030.00914.96
7.3.20.0000.01116.68
7.3.10.0060.00816.85
7.3.00.0040.00416.66
7.2.330.0110.00616.76
7.2.320.0060.00916.75
7.2.310.0070.01016.60
7.2.300.0130.00516.65
7.2.290.0100.01016.45
7.2.250.0100.01014.80
7.2.240.0070.01114.92
7.2.230.0060.01014.97
7.2.220.0000.01415.13
7.2.210.0080.00314.80
7.2.200.0060.00615.25
7.2.190.0000.01015.11
7.2.180.0040.00815.06
7.2.170.0040.00815.22
7.2.160.0030.01315.13
7.2.150.0000.01117.07
7.2.140.0000.01417.02
7.2.130.0000.01516.85
7.2.120.0110.00417.07
7.2.110.0040.01116.69
7.2.100.0040.00716.93
7.2.90.0040.01116.80
7.2.80.0030.01316.90
7.2.70.0100.00316.80
7.2.60.0030.01316.85
7.2.50.0030.00617.01
7.2.40.0060.01217.07
7.2.30.0030.01016.82
7.2.20.0090.00616.96
7.2.10.0110.00416.84
7.2.00.0070.01016.95
7.1.330.0030.01415.73
7.1.320.0060.00615.74
7.1.310.0060.00915.71
7.1.300.0060.00315.81
7.1.290.0070.00715.66
7.1.280.0030.00915.56
7.1.270.0000.01115.67
7.1.260.0030.01015.82
7.1.250.0110.00315.89
7.1.240.0070.01115.66
7.1.230.0070.01116.00
7.1.220.0100.00315.70
7.1.210.0100.00315.68
7.1.200.0080.00015.84
7.1.190.0070.00715.98
7.1.180.0100.00315.94
7.1.170.0080.00515.60
7.1.160.0110.00315.80
7.1.150.0000.01315.54
7.1.140.0060.00315.98
7.1.130.0100.00615.86
7.1.120.0110.00415.75
7.1.110.0030.00915.95
7.1.100.0110.00415.72
7.1.90.0000.01615.75
7.1.80.0000.01615.90
7.1.70.0090.00416.24
7.1.60.0030.01017.63
7.1.50.0060.01216.49
7.1.40.0090.00915.75
7.1.30.0090.00415.93
7.1.20.0040.00715.63
7.1.10.0040.00815.98
7.1.00.0050.04219.21
7.0.330.0040.01115.39
7.0.320.0000.01215.37
7.0.310.0080.00015.45
7.0.300.0030.00615.35
7.0.290.0060.00615.57
7.0.280.0060.00315.41
7.0.270.0000.01415.50
7.0.260.0030.01015.43
7.0.250.0030.01215.34
7.0.240.0080.00315.58
7.0.230.0070.00715.44
7.0.220.0040.01115.69
7.0.210.0100.00315.49
7.0.200.0040.00715.90
7.0.190.0060.01215.52
7.0.180.0100.00315.60
7.0.170.0030.00615.61
7.0.160.0030.00915.67
7.0.150.0000.01115.34
7.0.140.0040.04018.84
7.0.130.0150.00315.48
7.0.120.0060.00315.32
7.0.110.0100.02517.66
7.0.100.0080.02317.83
7.0.90.0100.02617.64
7.0.80.0080.02317.68
7.0.70.0070.03717.77
7.0.60.0090.03217.71
7.0.50.0020.02817.74
7.0.40.0050.03016.56
7.0.30.0020.02416.72
7.0.20.0120.01716.66
7.0.10.0040.02716.57
7.0.00.0070.02016.56
5.6.400.0070.00414.27
5.6.390.0080.00414.56
5.6.380.0000.01214.36
5.6.370.0040.01114.30
5.6.360.0070.00714.56
5.6.350.0090.00414.45
5.6.340.0070.00714.62
5.6.330.0040.00814.71
5.6.320.0050.01014.61
5.6.310.0040.01214.70
5.6.300.0070.00714.41
5.6.290.0080.00414.10
5.6.280.0050.04317.57
5.6.270.0000.01114.08
5.6.260.0050.02217.56
5.6.250.0070.02017.59
5.6.240.0090.02117.41
5.6.230.0030.04717.58
5.6.220.0090.03417.51
5.6.210.0130.01817.53
5.6.200.0070.02317.56
5.6.190.0080.02317.43
5.6.180.0090.02117.48
5.6.170.0030.02817.63
5.6.160.0060.02117.43
5.6.150.0000.03117.41
5.6.140.0070.01717.51
5.6.130.0020.02717.60
5.6.120.0070.01617.52
5.6.110.0010.02617.56
5.6.100.0050.02017.47
5.6.90.0030.02917.37
5.6.80.0030.02217.19
5.6.70.0030.02517.06
5.6.60.0080.01817.05
5.6.50.0090.01517.05
5.6.40.0040.02417.29
5.6.30.0020.02817.10
5.6.20.0030.04517.02
5.6.10.0030.02517.26
5.6.00.0070.02517.33
5.5.380.0040.02415.90
5.5.370.0020.02716.00
5.5.360.0080.02015.83
5.5.350.0000.02915.88
5.5.340.0000.02916.14
5.5.330.0060.02516.22
5.5.320.0020.02516.04
5.5.310.0070.02316.09
5.5.300.0080.02016.21
5.5.290.0030.02316.28
5.5.280.0050.02215.95
5.5.270.0070.01816.12
5.5.260.0030.02315.98
5.5.250.0070.02615.96
5.5.240.0050.01715.69
5.5.230.0050.02315.81
5.5.220.0030.02515.82
5.5.210.0000.02615.71
5.5.200.0040.02715.88
5.5.190.0000.02315.91
5.5.180.0070.02015.92
5.5.170.0000.01114.01
5.5.160.0120.01715.71
5.5.150.0020.03415.57
5.5.140.0100.03615.72
5.5.130.0070.03815.69
5.5.120.0030.02815.86
5.5.110.0030.04115.75
5.5.100.0050.03915.72
5.5.90.0020.03915.68
5.5.80.0060.03315.79
5.5.70.0050.03515.82
5.5.60.0050.04315.52
5.5.50.0030.03315.81
5.5.40.0070.02515.80
5.5.30.0050.03215.96
5.5.20.0080.03315.53
5.5.10.0050.03215.62
5.5.00.0050.04315.64
5.4.450.0070.02515.63
5.4.440.0050.01815.79
5.4.430.0080.02315.62
5.4.420.0000.02415.71
5.4.410.0080.02015.61
5.4.400.0070.02015.56
5.4.390.0070.01615.51
5.4.380.0080.01615.51
5.4.370.0030.02015.50
5.4.360.0020.02615.51
5.4.350.0030.01715.46
5.4.340.0040.02315.58
5.4.330.0090.00311.99
5.4.320.0060.02015.59
5.4.310.0070.04215.46
5.4.300.0050.02915.45
5.4.290.0020.02315.49
5.4.280.0080.03715.58
5.4.270.0070.02815.64
5.4.260.0040.01915.55
5.4.250.0020.03715.46
5.4.240.0050.03315.62
5.4.230.0030.03815.48
5.4.220.0030.02515.54
5.4.210.0020.04115.59
5.4.200.0070.04015.46
5.4.190.0060.02015.63
5.4.180.0030.03215.54
5.4.170.0110.03515.50
5.4.160.0020.04015.56
5.4.150.0080.04015.57
5.4.140.0020.04114.12
5.4.130.0050.02514.24
5.4.120.0020.02414.11
5.4.110.0040.04214.11
5.4.100.0030.04014.18
5.4.90.0050.04114.24
5.4.80.0040.04114.23
5.4.70.0030.03814.25
5.4.60.0030.02814.24
5.4.50.0030.02814.25
5.4.40.0000.02714.15
5.4.30.0020.02214.16
5.4.20.0050.03014.09
5.4.10.0020.04314.23
5.4.00.0030.02113.83
5.3.290.0100.01713.26
5.3.280.0070.02613.19
5.3.270.0060.02913.23
5.3.260.0100.03313.29
5.3.250.0070.03413.26
5.3.240.0040.04013.22
5.3.230.0050.03513.30
5.3.220.0070.04013.18
5.3.210.0080.03013.19
5.3.200.0060.03813.22
5.3.190.0050.03613.25
5.3.180.0070.03513.24
5.3.170.0040.04013.33
5.3.160.0030.04213.31
5.3.150.0030.03313.32
5.3.140.0030.02113.28
5.3.130.0030.04513.23
5.3.120.0060.01813.30
5.3.110.0070.02913.23
5.3.100.0080.04012.98
5.3.90.0050.02912.95
5.3.80.0100.03212.97
5.3.70.0070.02212.97
5.3.60.0060.02313.01
5.3.50.0040.04112.93
5.3.40.0100.01713.00
5.3.30.0070.02012.90
5.3.20.0070.03212.85
5.3.10.0070.01712.75
5.3.00.0030.04012.78
5.2.170.0100.05712.24
5.2.160.0030.06012.24
5.2.150.0030.05012.24
5.2.140.0030.05712.24
5.2.130.0030.06312.24
5.2.120.0100.05312.24
5.2.110.0070.06012.24
5.2.100.0070.05712.24
5.2.90.0030.03712.24
5.2.80.0000.04712.24
5.2.70.0070.06312.24
5.2.60.0000.06312.24
5.2.50.0030.04712.24
5.2.40.0030.06712.24
5.2.30.0000.06712.24
5.2.20.0070.06312.24
5.2.10.0100.04312.24
5.2.00.0030.03312.24
5.1.60.0030.03712.24
5.1.50.0030.02712.24
5.1.40.0000.05312.24
5.1.30.0030.05012.24
5.1.20.0000.03012.24
5.1.10.0000.03012.24
5.1.00.0070.02712.24
5.0.50.0030.02712.24
5.0.40.0070.03312.24
5.0.30.0000.06312.24
5.0.20.0030.04312.24
5.0.10.0000.03312.24
5.0.00.0000.06712.24
4.4.90.0000.03312.24
4.4.80.0000.03712.24
4.4.70.0000.02012.24
4.4.60.0000.04012.24
4.4.50.0030.01712.24
4.4.40.0000.03012.24
4.4.30.0000.03712.24
4.4.20.0000.01712.24
4.4.10.0030.03712.24
4.4.00.0000.03312.24
4.3.110.0000.03312.24
4.3.100.0000.03712.24
4.3.90.0030.03312.24
4.3.80.0000.03712.24
4.3.70.0030.03312.24
4.3.60.0000.03712.24
4.3.50.0000.03712.24
4.3.40.0000.05012.24
4.3.30.0000.03012.24
4.3.20.0000.03712.24
4.3.10.0100.02012.24
4.3.00.0000.02312.24

preferences:
42.67 ms | 401 KiB | 5 Q