3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TEXT # one # two a-two b-two c-two # three a-three b-three # four TEXT; echo preg_replace_callback( "~^#~m", function () { static $counter = 0; return ++$counter; }, $text );

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.5.30.0050.00317.42
8.5.20.0100.00719.50
8.5.10.0130.01216.99
8.5.00.0130.00820.26
8.4.180.0130.01119.87
8.4.170.0150.00623.88
8.4.160.0040.00519.61
8.4.150.0080.00416.94
8.4.140.0150.00617.69
8.4.130.0110.00917.67
8.4.120.0120.00720.91
8.4.110.0030.00619.08
8.4.100.0120.00718.11
8.4.90.0160.00520.67
8.4.80.0060.00318.83
8.4.70.0120.00820.71
8.4.60.0130.00820.80
8.4.50.0090.00720.72
8.4.40.0100.01017.77
8.4.30.0190.00022.56
8.4.20.0100.01019.85
8.4.10.0100.01019.80
8.3.300.0150.00720.91
8.3.290.0120.01020.75
8.3.280.0140.00618.71
8.3.270.0110.01017.05
8.3.260.0120.00716.91
8.3.250.0050.00418.95
8.3.240.0140.00616.50
8.3.230.0070.00116.81
8.3.220.0060.00219.11
8.3.210.0140.00716.75
8.3.200.0050.00316.90
8.3.190.0140.00517.21
8.3.180.0130.00618.92
8.3.170.0120.00617.28
8.3.160.0100.01018.39
8.3.150.0120.00318.54
8.3.140.0090.00616.78
8.3.130.0040.00416.91
8.3.120.0110.01120.77
8.3.110.0140.00320.94
8.3.100.0080.00024.06
8.3.90.0070.01126.77
8.3.80.0030.00619.36
8.3.70.0060.01218.43
8.3.60.0100.01018.56
8.3.50.0100.01024.58
8.3.40.0120.00921.61
8.3.30.0090.00618.76
8.3.20.0040.00424.18
8.3.10.0000.00724.66
8.3.00.0090.00026.16
8.2.300.0110.00920.36
8.2.290.0100.00916.79
8.2.280.0040.00418.45
8.2.270.0170.00320.29
8.2.260.0060.01217.01
8.2.250.0030.00616.91
8.2.240.0120.00617.16
8.2.230.0090.00922.58
8.2.220.0000.00937.54
8.2.210.0040.01126.77
8.2.200.0090.00018.88
8.2.190.0150.00016.85
8.2.180.0110.00325.92
8.2.170.0100.00619.04
8.2.160.0080.00622.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00319.82
8.2.110.0040.00419.38
8.2.100.0120.00017.79
8.2.90.0030.00517.63
8.2.80.0080.00019.04
8.2.70.0000.00917.72
8.2.60.0080.00017.75
8.2.50.0040.00418.05
8.2.40.0050.00318.28
8.2.30.0030.00618.14
8.2.20.0040.00418.16
8.2.10.0040.00419.35
8.2.00.0050.00319.21
8.1.340.0110.00921.76
8.1.330.0150.00616.28
8.1.320.0090.01017.79
8.1.310.0150.00416.34
8.1.300.0070.00416.17
8.1.290.0060.00330.84
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0060.00626.35
8.1.250.0080.00028.09
8.1.240.0030.00624.05
8.1.230.0080.00417.89
8.1.220.0030.00617.74
8.1.210.0030.00618.77
8.1.200.0040.00417.47
8.1.190.0060.00317.38
8.1.180.0060.00318.10
8.1.170.0060.00318.65
8.1.160.0040.00418.98
8.1.150.0000.00718.93
8.1.140.0050.00518.96
8.1.130.0070.00020.20
8.1.120.0070.00017.58
8.1.110.0060.00317.52
8.1.100.0000.00817.66
8.1.90.0000.00817.60
8.1.80.0040.00417.54
8.1.70.0030.00317.53
8.1.60.0030.00617.77
8.1.50.0040.00417.58
8.1.40.0040.00417.56
8.1.30.0000.00817.79
8.1.20.0040.00417.81
8.1.10.0060.00317.71
8.1.00.0050.00317.46
8.0.300.0080.00018.77
8.0.290.0000.00916.88
8.0.280.0040.00418.48
8.0.270.0030.00318.22
8.0.260.0030.00318.65
8.0.250.0000.00717.16
8.0.240.0030.00317.20
8.0.230.0030.00517.06
8.0.220.0070.00017.11
8.0.210.0030.00317.17
8.0.200.0070.00017.04
8.0.190.0000.00717.21
8.0.180.0040.00417.04
8.0.170.0040.00417.01
8.0.160.0000.00817.14
8.0.150.0040.00417.03
8.0.140.0060.00617.11
8.0.130.0050.00013.53
8.0.120.0050.00317.08
8.0.110.0020.00517.00
8.0.100.0040.00416.97
8.0.90.0040.00417.01
8.0.80.0100.01117.10
8.0.70.0000.00716.89
8.0.60.0070.00017.05
8.0.50.0040.00417.09
8.0.30.0070.01117.54
8.0.20.0180.00317.29
8.0.10.0070.00017.20
8.0.00.0260.01016.82
7.4.330.0000.00515.55
7.4.320.0070.00016.77
7.4.300.0080.00016.75
7.4.290.0040.00416.59
7.4.280.0000.01016.73
7.4.270.0030.00316.68
7.4.260.0000.00513.36
7.4.250.0040.00416.78
7.4.240.0040.00416.75
7.4.230.0070.00016.83
7.4.220.0040.00316.75
7.4.210.0050.01016.77
7.4.200.0000.00716.64
7.4.130.0320.00716.66
7.4.120.0230.00916.75
7.4.110.0180.01216.73
7.4.100.0230.00816.67
7.4.90.0210.01016.49
7.4.80.0210.01316.76
7.4.70.0270.01116.68
7.4.60.0280.00516.93
7.4.50.0200.00816.61
7.4.40.0180.01316.82
7.4.30.0160.01316.76
7.4.20.0220.01016.75
7.4.10.0270.00316.76
7.4.00.0120.00916.95
7.3.330.0000.00716.30
7.3.320.0030.00313.48
7.3.310.0050.00316.34
7.3.300.0000.00816.41
7.3.290.0080.00716.46
7.3.260.0110.00716.46
7.3.250.0280.00416.75
7.3.240.0260.01316.46
7.3.230.0200.01016.39
7.3.220.0300.00816.67
7.3.210.0220.00916.51
7.3.200.0240.00816.52
7.3.190.0260.00716.66
7.3.180.0280.01216.73
7.3.170.0270.00716.66
7.3.160.0180.01416.50
7.3.150.0200.01516.64
7.3.140.0200.01116.57
7.3.130.0310.00016.59
7.3.120.0250.00816.69
7.3.110.0240.00916.65
7.3.100.0160.01316.21
7.3.90.0210.01416.34
7.3.80.0230.00816.45
7.3.70.0300.00316.49
7.3.60.0300.00516.67
7.3.50.0220.01516.56
7.3.40.0210.01316.49
7.3.30.0320.00716.53
7.3.20.0230.01616.37
7.3.10.0200.01716.62
7.3.00.0350.00416.62

preferences:
122.21 ms | 1362 KiB | 5 Q