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( [ $pattern1 => function ($match) { echo "pattern 1: \n"; print_r($match); }, $pattern2 => function ($match) { echo "pattern 2: \n"; print_r($match); } ], $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.0140.00418.43
8.3.50.0050.01116.84
8.3.40.0040.01118.96
8.3.30.0070.00718.77
8.3.20.0000.00720.64
8.3.10.0060.00320.34
8.3.00.0040.00423.66
8.2.180.0120.00925.92
8.2.170.0040.01122.96
8.2.160.0070.00720.38
8.2.150.0000.01124.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0090.00322.17
8.2.100.0040.00817.84
8.2.90.0000.00822.32
8.2.80.0060.00319.38
8.2.70.0060.00318.04
8.2.60.0040.00417.97
8.2.50.0000.00818.10
8.2.40.0050.00319.47
8.2.30.0000.00719.37
8.2.20.0050.00218.03
8.2.10.0050.00218.96
8.2.00.0040.00419.51
8.1.270.0050.00322.45
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.43
8.1.230.0050.00520.95
8.1.220.0080.00017.79
8.1.210.0000.00819.03
8.1.200.0000.00917.48
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0030.00518.71
8.1.160.0040.00418.91
8.1.150.0040.00418.96
8.1.140.0040.00418.91
8.1.130.0050.00220.23
8.1.120.0000.01017.64
8.1.110.0040.00417.61
8.1.100.0040.00417.64
8.1.90.0050.00317.61
8.1.80.0100.00017.45
8.1.70.0030.00317.62
8.1.60.0000.00817.62
8.1.50.0030.00517.68
8.1.40.0000.00917.59
8.1.30.0030.00617.82
8.1.20.0000.00817.72
8.1.10.0080.00017.68
8.1.00.0040.00417.55
8.0.300.0080.00019.89
8.0.290.0080.00316.75
8.0.280.0000.00718.48
8.0.270.0000.00717.28
8.0.260.0060.00318.47
8.0.250.0000.00717.00
8.0.240.0050.00217.04
8.0.230.0040.00317.09
8.0.220.0000.00716.93
8.0.210.0000.00717.02
8.0.200.0000.00817.07
8.0.190.0040.00417.04
8.0.180.0050.00317.06
8.0.170.0040.00417.09
8.0.160.0040.00417.00
8.0.150.0040.00417.02
8.0.140.0000.00716.88
8.0.130.0000.00613.48
8.0.120.0040.00417.01
8.0.110.0060.00316.90
8.0.100.0030.00516.91
8.0.90.0000.00816.99
8.0.80.0040.01116.96
8.0.70.0000.00816.96
8.0.60.0000.00716.90
8.0.50.0050.00317.01
8.0.30.0070.01417.22
8.0.20.0130.00717.32
8.0.10.0080.00017.19
8.0.00.0120.00616.80
7.4.330.0000.00515.55
7.4.320.0000.00616.79
7.4.300.0030.00316.71
7.4.290.0070.00016.81
7.4.280.0040.00616.80
7.4.270.0030.00316.71
7.4.260.0000.00716.82
7.4.250.0040.00416.83
7.4.240.0000.00716.71
7.4.230.0030.00516.91
7.4.220.0020.00516.79
7.4.210.0100.00816.83
7.4.200.0000.00716.80
7.4.160.0100.00716.67
7.4.130.0150.00316.50
7.4.120.0070.01116.58
7.4.110.0170.00216.76
7.4.100.0130.00416.66
7.4.90.0120.00616.59
7.4.80.0130.01019.39
7.4.70.0080.00816.83
7.4.60.0140.00416.68
7.4.50.0100.00316.67
7.4.40.0090.00916.76
7.4.00.0090.00315.11
7.3.330.0050.00013.28
7.3.320.0000.00613.30
7.3.310.0040.00416.54
7.3.300.0070.00016.46
7.3.290.0030.00316.32
7.3.280.0100.00516.36
7.3.260.0130.00516.59
7.3.240.0090.00916.62
7.3.230.0070.01016.46
7.3.210.0140.00316.50
7.3.200.0110.00616.76
7.3.190.0030.01216.40
7.3.180.0110.00716.81
7.3.170.0090.01316.72
7.3.160.0060.01016.64
7.3.50.0060.00714.92
7.3.40.0060.00814.77
7.3.30.0080.00514.79
7.3.20.0110.00414.94
7.3.10.0200.00615.05
7.3.00.0120.00414.85
7.2.330.0070.01116.72
7.2.320.0160.00316.63
7.2.310.0110.00716.81
7.2.300.0080.01216.72
7.2.290.0070.01316.65
7.2.180.0050.00815.09
7.2.170.0070.01015.28
7.2.160.0100.01015.24
7.2.150.0120.00614.86
7.2.140.0130.01015.06
7.2.130.0130.00315.39
7.2.120.0080.00815.26
7.2.110.0130.00315.14
7.2.100.0110.00915.24
7.2.90.0080.01215.28
7.2.80.0220.00715.00
7.2.70.0200.00015.12
7.2.60.0060.00915.23
7.2.50.0140.00615.14
7.2.40.0200.00815.14
7.2.30.0190.01315.29
7.2.20.0180.00615.26
7.2.10.0070.01015.34
7.2.00.0060.00915.19
7.1.280.0120.00314.23
7.1.270.0110.00814.23
7.1.260.0080.00813.87
7.1.250.0060.00913.89

preferences:
52.78 ms | 400 KiB | 5 Q