3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is a short sentence which should include all regex results"; echo preg_replace_callback( '~(\w{3})?(\w+)~', fn($m) => ($m[1] ? "+" : '') . "$m[0]*", $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.4.140.0140.00717.73
8.4.130.0060.00418.91
8.4.120.0130.00623.98
8.4.110.0070.00222.45
8.4.100.0120.00918.59
8.4.90.0100.01020.39
8.4.80.0110.00819.91
8.4.70.0050.00618.03
8.4.60.0080.00320.49
8.4.50.0110.00917.73
8.4.40.0080.00020.04
8.4.30.0170.00320.39
8.4.20.0130.00719.91
8.4.10.0040.00425.87
8.3.260.0130.00816.54
8.3.250.0090.01119.05
8.3.240.0140.00517.19
8.3.230.0100.00916.38
8.3.220.0120.00718.80
8.3.210.0150.00416.95
8.3.200.0050.00416.49
8.3.190.0090.01017.18
8.3.180.0090.01016.48
8.3.170.0100.01016.65
8.3.160.0000.00816.70
8.3.150.0180.00018.91
8.3.140.0150.00420.79
8.3.130.0070.00416.73
8.3.120.0030.00618.97
8.3.110.0000.01120.94
8.3.100.0060.00316.63
8.3.90.0050.00326.77
8.3.80.0050.00516.88
8.3.70.0070.00716.63
8.3.60.0140.00418.29
8.3.50.0070.00720.17
8.3.40.0060.01318.92
8.3.30.0110.00419.27
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0070.00620.50
8.2.280.0120.00418.51
8.2.270.0090.00916.76
8.2.260.0040.00716.58
8.2.250.0040.01116.75
8.2.240.0060.00316.95
8.2.230.0120.00322.58
8.2.220.0150.00024.06
8.2.210.0090.00626.77
8.2.200.0070.00316.63
8.2.190.0140.00016.75
8.2.180.0110.00425.92
8.2.170.0120.00619.12
8.2.160.0090.00622.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0060.00326.16
8.2.110.0030.00621.13
8.2.100.0000.01117.97
8.2.90.0050.00220.48
8.2.80.0040.00417.97
8.2.70.0060.00317.93
8.2.60.0060.00318.16
8.2.50.0000.00919.62
8.2.40.0080.00021.27
8.2.30.0040.00419.35
8.2.20.0060.00320.53
8.2.10.0030.00918.16
8.2.00.0050.00219.34
8.1.330.0110.00722.01
8.1.320.0130.00616.43
8.1.310.0140.00418.50
8.1.300.0050.00318.68
8.1.290.0030.00630.84
8.1.280.0140.00725.92
8.1.270.0070.00023.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00319.41
8.1.230.0060.00620.97
8.1.220.0040.00417.78
8.1.210.0000.00919.16
8.1.200.0060.00317.48
8.1.190.0060.00317.47
8.1.180.0000.00918.10
8.1.170.0080.00018.83
8.1.160.0040.00419.04
8.1.150.0000.00718.79
8.1.140.0000.00717.64
8.1.130.0070.00018.97
8.1.120.0040.00417.68
8.1.110.0000.00817.56
8.1.100.0050.00217.52
8.1.90.0040.00417.64
8.1.80.0040.00417.45
8.1.70.0040.00417.50
8.1.60.0040.00417.75
8.1.50.0150.00717.68
8.1.40.0200.00517.64
8.1.30.0200.00317.78
8.1.20.0190.00517.80
8.1.10.0230.00317.59
8.1.00.0250.00317.60
8.0.300.0000.00720.05
8.0.290.0050.00216.88
8.0.280.0000.00718.36
8.0.270.0000.00718.04
8.0.260.0030.00318.39
8.0.250.0030.00317.11
8.0.240.0070.00017.11
8.0.230.0040.00317.13
8.0.220.0080.00017.02
8.0.210.0000.00716.98
8.0.200.0060.00317.12
8.0.190.0030.00517.03
8.0.180.0180.00417.06
8.0.170.0140.00817.00
8.0.160.0190.00417.00
8.0.150.0170.00616.84
8.0.140.0150.00616.87
8.0.130.0150.00516.86
8.0.120.0110.01016.82
8.0.110.0100.00916.85
8.0.100.0110.00716.87
8.0.90.0140.00316.80
8.0.80.0160.00016.92
8.0.70.0120.00916.89
8.0.60.0130.00817.08
8.0.50.0090.00716.95
8.0.30.0130.00617.02
8.0.20.0130.00617.13
8.0.10.0140.00517.04
7.4.330.0070.00015.55
7.4.320.0000.00716.62
7.4.300.0000.00616.80
7.4.290.0050.00316.74
7.4.280.0140.00616.72
7.4.270.0110.00516.66
7.4.260.0150.00516.63
7.4.250.0130.00516.61
7.4.240.0170.00316.64
7.4.230.0110.00916.76
7.4.220.0130.00816.75
7.4.210.0080.00816.71
7.4.200.0180.00116.72
7.4.190.0120.00616.74
7.4.180.0170.00316.61
7.4.160.0110.01116.73
7.4.150.0110.00716.77
7.4.140.0100.00716.70
7.4.130.0110.00316.66
7.4.120.0130.00316.69
7.4.110.0060.00716.75
7.4.100.0090.00716.80
7.4.90.0140.00116.73
7.4.80.0060.00716.63
7.4.70.0130.00216.73
7.4.60.0140.00416.62
7.4.50.0100.00916.55
7.4.40.0160.00116.57
7.4.30.0130.00416.65
7.4.20.0070.00716.69
7.4.10.0130.00116.75
7.4.00.0150.00516.51

preferences:
29.11 ms | 403 KiB | 5 Q