3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = <<<'EOD' {| test1 test2 test3 test4 test5 |} {| test6 test7 test8 test9 test10 |} EOD; echo preg_replace('~ (?: \G (?!\A) | \Q{|\E ) [^|\n]*+ (?s: (?! \Q|}\E | \n\n) . [^|\n]*)*+ \n \K \n+ ~x', '', $txt); echo PHP_EOL, '---', PHP_EOL; echo preg_replace_callback('~\Q{|\E .*? \Q|}\E~sx', function ($m) { return preg_replace('~\n+~', "\n", $m[0]); }, $txt);

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.0090.00618.56
8.3.60.0090.00618.43
8.3.50.0080.01121.00
8.3.40.0110.00419.10
8.3.30.0080.00818.94
8.3.20.0040.00421.77
8.3.10.0040.00420.22
8.3.00.0100.00023.48
8.2.190.0110.00718.63
8.2.180.0040.01216.63
8.2.170.0070.01122.96
8.2.160.0090.00620.31
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0100.00017.93
8.2.110.0030.00720.58
8.2.100.0030.00918.16
8.2.90.0040.00418.17
8.2.80.0000.00918.16
8.2.70.0040.00417.75
8.2.60.0040.00417.88
8.2.50.0040.00417.75
8.2.40.0080.00021.31
8.2.30.0070.00019.29
8.2.20.0080.00318.19
8.2.10.0000.00821.04
8.2.00.0030.00519.32
8.1.280.0070.01025.92
8.1.270.0000.00823.76
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.85
8.1.230.0030.00820.75
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.00817.50
8.1.190.0050.00517.50
8.1.180.0080.00018.10
8.1.170.0060.00318.77
8.1.160.0000.00719.00
8.1.150.0000.00718.94
8.1.140.0000.00722.24
8.1.130.0040.00420.20
8.1.120.0040.00417.64
8.1.110.0060.00517.68
8.1.100.0070.00017.52
8.1.90.0050.00517.52
8.1.80.0000.00817.66
8.1.70.0060.00317.64
8.1.60.0030.00517.74
8.1.50.0050.00317.70
8.1.40.0000.00817.68
8.1.30.0040.00417.88
8.1.20.0060.00317.84
8.1.10.0040.00417.75
8.1.00.0070.00317.76
8.0.300.0040.00420.21
8.0.290.0060.00317.13
8.0.280.0080.00018.50
8.0.270.0040.00417.32
8.0.260.0040.00421.89
8.0.250.0000.00817.18
8.0.240.0000.00717.08
8.0.230.0080.00017.14
8.0.220.0070.00016.91
8.0.210.0030.00317.00
8.0.200.0030.00717.11
8.0.190.0040.00417.18
8.0.180.0040.00417.17
8.0.170.0030.00617.06
8.0.160.0080.00017.15
8.0.150.0000.00817.04
8.0.140.0050.00317.11
8.0.130.0040.00413.64
8.0.120.0050.00317.10
8.0.110.0050.00216.97
8.0.100.0060.00317.01
8.0.90.0060.00317.04
8.0.80.0070.01117.05
8.0.70.0040.00417.16
8.0.60.0040.00417.02
8.0.50.0050.00317.10
8.0.30.0030.01317.16
8.0.20.0170.00717.37
8.0.10.0060.00317.30
8.0.00.0100.00917.02
7.4.330.0060.00015.55
7.4.320.0030.00316.71
7.4.300.0030.00616.86
7.4.290.0000.00716.87
7.4.280.0080.00016.79
7.4.270.0000.00816.75
7.4.260.0030.00316.64
7.4.250.0040.00416.71
7.4.240.0070.00016.76
7.4.230.0030.00316.92
7.4.220.0030.00316.68
7.4.210.0070.00816.82
7.4.200.0000.00716.63
7.4.130.0200.00016.60
7.4.120.0080.00816.88
7.4.110.0060.01216.63
7.4.100.0120.00616.60
7.4.90.0070.01117.00
7.4.80.0060.01619.39
7.4.70.0320.01716.71
7.4.60.0060.01916.74
7.4.50.0040.01416.78
7.4.40.0110.00916.78
7.4.00.0110.00715.05
7.3.330.0000.00513.58
7.3.320.0050.00013.37
7.3.310.0000.00816.51
7.3.300.0040.00416.55
7.3.290.0030.00316.49
7.3.280.0090.00916.39
7.3.260.0070.01016.59
7.3.240.0110.00816.71
7.3.230.0160.00316.68
7.3.210.0070.01016.57
7.3.200.0140.00316.64
7.3.190.0060.01016.70
7.3.180.0130.01016.59
7.3.170.0100.00716.53
7.3.160.0070.01016.59
7.3.70.0050.00914.74
7.3.60.0030.00914.68
7.3.50.0000.01414.80
7.3.40.0000.01415.11
7.3.30.0060.01314.98
7.3.20.0090.00614.72
7.3.10.0130.00314.95
7.3.00.0110.00415.05
7.2.330.0140.00316.71
7.2.320.0140.00516.82
7.2.310.0080.01116.55
7.2.300.0070.01316.67
7.2.290.0140.00716.63
7.2.200.0070.00714.97
7.2.190.0090.00615.09
7.2.180.0090.00615.15
7.2.170.0030.00915.16
7.2.160.0070.00715.27
7.2.150.0090.00915.16
7.2.140.0040.01514.82
7.2.130.0100.01615.25
7.2.120.0090.00615.15
7.2.110.0160.00315.23
7.2.100.0100.01015.16
7.2.90.0120.00615.42
7.2.80.0050.01015.23
7.2.70.0120.00815.15
7.2.60.0150.00315.00
7.2.50.0150.00315.29
7.2.40.0180.00315.19
7.2.30.0120.00615.03
7.2.20.0060.01314.97
7.2.10.0170.00315.30
7.2.00.0060.01015.22
7.1.300.1410.01014.10
7.1.290.0110.00814.08
7.1.280.0070.00714.02
7.1.270.0160.00014.38
7.1.260.0090.00914.10
7.1.250.0060.00914.31

preferences:
32.1 ms | 401 KiB | 5 Q