3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "The Chernobyl disaster was a catastrophic nuclear accident that occurred on 26 April 1986, in the No. 4 nuclear reactor at the Chernobyl Nuclear Power Plant, near the city of Pripyat, in the north of the Ukrainian SSR."; $pattern1 = '%[A-Z]\w+%'; $pattern2 = '%\d+%'; preg_replace_callback_array( [ '~[a]+~i' => function ($match) { echo strlen($match[0]), ' matches for "a" found', PHP_EOL; }, '~[b]+~i' => function ($match) { echo strlen($match[0]), ' matches for "b" found', PHP_EOL; } ], $string );

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.0070.01018.50
8.3.50.0100.00816.86
8.3.40.0030.01219.02
8.3.30.0120.00318.65
8.3.20.0040.00420.76
8.3.10.0000.00820.29
8.3.00.0080.00023.54
8.2.180.0070.01125.92
8.2.170.0060.00922.96
8.2.160.0030.01020.43
8.2.150.0030.00624.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0070.00322.13
8.2.100.0100.00717.78
8.2.90.0060.00317.99
8.2.80.0030.00619.15
8.2.70.0050.00318.00
8.2.60.0050.00318.03
8.2.50.0050.00318.10
8.2.40.0040.00419.46
8.2.30.0050.00319.28
8.2.20.0040.00418.02
8.2.10.0040.00418.96
8.2.00.0000.00719.57
8.1.280.0070.00725.92
8.1.270.0050.00322.60
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0090.00024.02
8.1.230.0090.00322.75
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0100.00017.48
8.1.190.0030.00517.48
8.1.180.0040.00418.10
8.1.170.0050.00318.78
8.1.160.0050.00218.82
8.1.150.0000.00718.91
8.1.140.0000.00818.82
8.1.130.0000.00720.14
8.1.120.0040.00417.64
8.1.110.0000.00717.61
8.1.100.0040.00417.59
8.1.90.0000.00717.57
8.1.80.0060.00617.48
8.1.70.0000.00817.63
8.1.60.0050.00217.70
8.1.50.0030.00617.56
8.1.40.0040.00417.63
8.1.30.0050.00317.80
8.1.20.0090.00017.73
8.1.10.0050.00317.64
8.1.00.0000.00817.63
8.0.300.0040.00420.10
8.0.290.0040.00416.58
8.0.280.0070.00018.47
8.0.270.0030.00317.18
8.0.260.0030.00618.46
8.0.250.0030.00316.98
8.0.240.0030.00316.99
8.0.230.0080.00016.92
8.0.220.0000.00716.91
8.0.210.0000.00717.00
8.0.200.0030.00316.98
8.0.190.0070.00017.10
8.0.180.0050.00217.06
8.0.170.0030.00517.05
8.0.160.0000.00817.02
8.0.150.0040.00416.94
8.0.140.0050.00316.95
8.0.130.0030.00313.48
8.0.120.0070.00016.98
8.0.110.0080.00016.97
8.0.100.0000.00817.08
8.0.90.0000.00816.89
8.0.80.0000.01517.02
8.0.70.0000.00717.06
8.0.60.0000.00816.86
8.0.50.0030.00516.84
8.0.30.0120.00917.15
8.0.20.0150.00617.51
8.0.10.0040.00416.93
8.0.00.0110.00916.88
7.4.330.0020.00215.55
7.4.320.0060.00016.81
7.4.300.0040.00416.80
7.4.290.0000.00716.77
7.4.280.0050.00316.79
7.4.270.0070.00016.82
7.4.260.0040.00416.70
7.4.250.0030.00516.69
7.4.240.0050.00316.79
7.4.230.0040.00316.54
7.4.220.0000.00816.69
7.4.210.0070.01016.81
7.4.200.0030.00516.74
7.4.160.0100.00816.74
7.4.130.0120.00916.87
7.4.120.0030.01616.74
7.4.110.0150.00816.79
7.4.100.0100.00716.60
7.4.90.0140.00416.63
7.4.80.0210.00019.39
7.4.70.0150.00616.75
7.4.60.0100.00716.50
7.4.50.0030.01016.73
7.4.40.0120.00616.84
7.4.10.0050.01215.04
7.4.00.0060.01215.12
7.3.330.0000.00513.27
7.3.320.0000.00613.38
7.3.310.0030.00316.42
7.3.300.0040.00416.46
7.3.290.0060.00016.33
7.3.280.0080.00916.32
7.3.260.0130.00916.52
7.3.240.0090.01016.46
7.3.230.0060.01216.63
7.3.210.0120.00616.61
7.3.200.0160.00716.73
7.3.190.0040.01316.43
7.3.180.0090.00916.38
7.3.170.0000.01716.52
7.3.160.0140.00316.56
7.3.130.0100.00815.01
7.3.120.0100.00715.05
7.3.110.0060.01114.99
7.3.100.0040.01014.93
7.3.90.0070.01014.91
7.3.80.0090.00514.95
7.3.70.0050.00714.90
7.3.60.0050.00914.97
7.3.50.0080.00614.98
7.3.40.0060.00714.92
7.3.30.0060.00814.96
7.3.20.0080.00516.93
7.3.10.0090.00516.66
7.3.00.0070.00816.81
7.2.330.0090.00916.89
7.2.320.0060.01516.79
7.2.310.0060.01016.70
7.2.300.0150.00616.60
7.2.290.0140.00516.88
7.2.260.0070.00815.27
7.2.250.0080.01115.18
7.2.240.0050.01015.12
7.2.230.0090.00615.15
7.2.220.0080.00515.23
7.2.210.0050.00915.14
7.2.200.0070.00815.01
7.2.190.0060.00715.18
7.2.180.0060.00615.04
7.2.170.0090.00615.21
7.2.160.0040.01315.21
7.2.150.0070.00916.96
7.2.140.0050.00916.92
7.2.130.0070.00716.99
7.2.120.0060.00916.99
7.2.110.0050.00616.96
7.2.100.0070.00916.97
7.2.90.0040.00917.21
7.2.80.0080.00616.85
7.2.70.0050.00917.01
7.2.60.0070.00817.08
7.2.50.0060.00617.08
7.2.40.0070.00716.95
7.2.30.0080.00316.92
7.2.20.0040.01117.20
7.2.10.0080.00716.99
7.2.00.0070.00716.87
7.1.330.0070.00815.97
7.1.320.0070.00616.06
7.1.310.0080.00715.87
7.1.300.0060.00715.81
7.1.290.0030.01115.92
7.1.280.0080.00815.87
7.1.270.0060.00715.83
7.1.260.0070.00815.92
7.1.250.0060.00715.83
7.1.240.0030.00715.93
7.1.230.0100.00416.02
7.1.220.0050.00915.67
7.1.210.0040.00815.90
7.1.200.0080.00515.98
7.1.190.0050.00716.01
7.1.180.0090.00515.81
7.1.170.0060.00715.93
7.1.160.0090.00315.86
7.1.150.0080.00515.92
7.1.140.0070.00715.79
7.1.130.0060.00715.75
7.1.120.0060.00615.86
7.1.110.0070.00615.79
7.1.100.0050.00615.85
7.1.90.0080.00315.84
7.1.80.0050.01016.10
7.1.70.0060.01015.83
7.1.60.0090.00716.03
7.1.50.0080.00616.01
7.1.40.0050.00816.00
7.1.30.0090.00615.95
7.1.20.0060.00515.84
7.1.10.0050.00415.87
7.1.00.0100.00316.00

preferences:
67.63 ms | 401 KiB | 5 Q