3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP const pattern = "#\{(?:(?<name>\w+))(?:/\}|\}(?<snippet>(?:[^{]*|(?!\{\w+:\})|(?R))*)\{end\})#mu"; $ss = <<<'EOD' {first} {second}within second{end} {end} EOD; function testRun($input ){ echo $input[0]; echo PHP_EOL; } preg_replace_callback( pattern ,'testRun',$ss);

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.70.0100.00716.50
8.3.60.0140.00418.56
8.3.50.0210.00722.14
8.3.40.0040.01819.18
8.3.30.0150.00318.92
8.3.20.0080.00019.19
8.3.10.0040.00421.83
8.3.00.0080.00020.64
8.2.190.0090.00618.66
8.2.180.0170.00318.92
8.2.170.0070.01022.96
8.2.160.0060.01020.39
8.2.150.0000.00824.18
8.2.140.0020.00524.66
8.2.130.0030.00519.45
8.2.120.0080.00026.35
8.2.110.0030.00619.39
8.2.100.0100.00318.16
8.2.90.0000.00819.25
8.2.80.0040.00417.97
8.2.70.0040.00417.88
8.2.60.0060.00317.93
8.2.50.0030.00518.10
8.2.40.0050.00320.53
8.2.30.0000.00819.48
8.2.20.0080.00018.31
8.2.10.0040.00418.30
8.2.00.0040.00418.05
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00723.77
8.1.230.0040.00717.76
8.1.220.0030.00617.91
8.1.210.0050.00318.77
8.1.200.0030.00717.61
8.1.190.0000.00817.47
8.1.180.0040.00418.10
8.1.170.0040.00421.90
8.1.160.0000.00718.99
8.1.150.0040.00418.91
8.1.140.0050.00319.68
8.1.130.0030.00319.13
8.1.120.0000.00717.60
8.1.110.0040.00417.61
8.1.100.0040.00417.55
8.1.90.0030.00517.66
8.1.80.0040.00417.62
8.1.70.0030.00517.66
8.1.60.0030.00617.64
8.1.50.0060.00317.70
8.1.40.0040.00417.73
8.1.30.0040.00417.72
8.1.20.0000.00817.82
8.1.10.0030.00617.66
8.1.00.0000.00817.66
8.0.300.0000.00818.77
8.0.290.0060.00317.00
8.0.280.0030.00518.39
8.0.270.0070.00017.31
8.0.260.0030.00317.35
8.0.250.0030.00317.25
8.0.240.0030.00517.25
8.0.230.0040.00417.23
8.0.220.0030.00317.15
8.0.210.0030.00317.31
8.0.200.0030.00317.21
8.0.190.0050.00317.16
8.0.180.0030.00617.14
8.0.170.0070.00017.21
8.0.160.0030.00517.15
8.0.150.0000.00717.09
8.0.140.0000.00717.14
8.0.130.0060.00013.59
8.0.120.0030.00617.21
8.0.110.0040.00417.27
8.0.100.0040.00317.28
8.0.90.0050.00317.32
8.0.80.0030.01317.26
8.0.70.0060.00317.23
8.0.60.0040.00417.08
8.0.50.0050.00317.19
8.0.30.0080.00817.45
8.0.20.0120.00817.49
8.0.10.0000.00717.30
8.0.00.0140.00417.03
7.4.330.0070.00015.55
7.4.320.0030.00316.81
7.4.300.0060.00016.90
7.4.290.0000.00816.84
7.4.280.0070.00016.88
7.4.270.0080.00016.89
7.4.260.0100.00016.79
7.4.250.0040.00416.80
7.4.240.0030.00816.80
7.4.230.0030.00316.79
7.4.220.0070.01616.95
7.4.210.0100.00717.00
7.4.200.0070.00016.55
7.4.160.0140.00616.88
7.4.150.0170.00317.40
7.4.140.0110.00717.86
7.4.130.0090.00916.87
7.4.120.0130.00516.81
7.4.110.0150.00416.83
7.4.100.0070.01516.64
7.4.90.0100.00616.89
7.4.80.0090.00919.39
7.4.70.0100.01016.95
7.4.60.0060.01016.80
7.4.50.0140.00016.62
7.4.40.0090.01216.73
7.4.30.0080.00816.57
7.4.00.0090.00715.40
7.3.330.0030.00313.56
7.3.320.0000.00513.58
7.3.310.0000.00916.64
7.3.300.0040.00416.52
7.3.290.0100.00416.50
7.3.280.0070.01316.54
7.3.270.0110.01517.40
7.3.260.0100.00616.57
7.3.250.0130.00616.65
7.3.240.0100.01216.76
7.3.230.0070.01016.62
7.3.210.0120.00616.65
7.3.200.0120.00416.58
7.3.190.0110.00716.66
7.3.180.0130.00316.52
7.3.170.0120.00416.79
7.3.160.0030.02016.78
7.3.120.0100.01014.88
7.3.110.0070.00714.91
7.3.100.0070.01115.04
7.3.90.0090.00815.22
7.3.80.0040.00715.11
7.3.70.0040.00814.63
7.3.60.0070.00715.12
7.3.50.0060.01015.14
7.3.40.0070.01114.91
7.3.30.0080.00415.08
7.3.20.0100.00716.70
7.3.10.0000.01216.63
7.3.00.0040.01116.71
7.2.330.0070.01016.86
7.2.320.0030.02016.95
7.2.310.0120.01316.72
7.2.300.0150.00316.65
7.2.290.0130.00716.76
7.2.250.0060.01315.08
7.2.240.0030.01715.16
7.2.230.0100.00315.02
7.2.220.0000.01415.23
7.2.210.0060.00915.35
7.2.200.0090.00615.33
7.2.190.0060.01015.32
7.2.180.0080.00815.25
7.2.170.0100.00615.29
7.2.60.0090.00416.90
7.2.50.0040.01117.27
7.1.330.0060.00615.66
7.1.320.0000.01316.01
7.1.310.0060.01216.10
7.1.300.0110.00416.03
7.1.290.0060.00915.87
7.1.280.0070.01016.11
7.1.270.0060.00615.90
7.1.260.0060.00915.88
7.1.200.0030.00315.74
7.1.70.0030.00517.43
7.1.60.0040.00717.39
7.1.00.0770.05020.70
7.0.200.0000.01116.80
7.0.140.0670.06720.31
7.0.130.0730.08320.38
7.0.120.0700.05320.30
7.0.110.0830.08320.32
7.0.100.0730.05320.34
7.0.90.0630.05320.36
7.0.80.0670.05720.36
7.0.70.0570.05720.24
7.0.60.0600.06020.07
7.0.50.0770.05320.25
7.0.40.0500.06020.37
7.0.30.0730.07320.19
7.0.20.0500.06020.23
7.0.10.0530.05320.19
7.0.00.0700.05020.16
5.6.290.0000.06720.82
5.6.280.0200.04721.07
5.6.270.0100.07320.89
5.6.260.0200.04720.96
5.6.250.0030.06321.07
5.6.240.0230.05020.82
5.6.230.0170.06320.88
5.6.220.0030.06720.83
5.6.210.0170.05720.98
5.6.200.0170.06021.06
5.6.190.0170.05320.86
5.6.180.0030.06321.04
5.6.170.0130.06320.78
5.6.160.0170.05021.07
5.6.150.0170.05321.08
5.6.140.0130.05720.77
5.6.130.0070.05721.07
5.6.120.0070.06720.88
5.6.110.0130.05720.87
5.6.100.0200.05020.98
5.6.90.0030.06321.00
5.6.80.0070.05720.27
5.6.70.0130.05020.43
5.6.60.0030.06320.11
5.6.50.0100.05320.44
5.6.40.0170.07020.26
5.6.30.0230.06320.18
5.6.20.0070.06020.13
5.6.10.0030.06020.35
5.6.00.0100.05320.33

preferences:
50.86 ms | 401 KiB | 5 Q