3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original_string = 'I like apples very much. I want an apple.'; $final_string = preg_replace("/(apples?)/", "_$1_", $original_string); echo $final_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.20.0130.00620.38
8.4.10.0070.01419.57
8.3.150.0120.00616.58
8.3.140.0030.00717.20
8.3.130.0000.00818.16
8.3.120.0060.00318.67
8.3.110.0040.00416.79
8.3.100.0090.00024.06
8.3.90.0150.00326.77
8.3.80.0060.00318.31
8.3.70.0100.01016.58
8.3.60.0100.01018.43
8.3.50.0020.01024.57
8.3.40.0030.01218.84
8.3.30.0000.01418.76
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.270.0080.00018.89
8.2.260.0050.00316.69
8.2.250.0070.00316.63
8.2.240.0040.00417.05
8.2.230.0000.00820.94
8.2.220.0040.01537.54
8.2.210.0060.00326.77
8.2.200.0090.00016.88
8.2.190.0090.01218.29
8.2.180.0110.00425.92
8.2.170.0080.00618.91
8.2.160.0130.00022.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00026.35
8.2.110.0060.00321.31
8.2.100.0060.00617.81
8.2.90.0060.00318.16
8.2.80.0030.00519.12
8.2.70.0000.00817.93
8.2.60.0000.00718.03
8.2.50.0000.00818.10
8.2.40.0080.00021.13
8.2.30.0000.00719.33
8.2.20.0040.00418.01
8.2.10.0000.00819.33
8.2.00.0080.00019.29
8.1.310.0080.00018.71
8.1.300.0090.00918.11
8.1.290.0060.00330.84
8.1.280.0070.01025.92
8.1.270.0080.00023.99
8.1.260.0000.00828.09
8.1.250.0030.00628.09
8.1.240.0060.00319.25
8.1.230.0080.00420.95
8.1.220.0030.00517.74
8.1.210.0090.00018.88
8.1.200.0030.00517.35
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0040.00418.69
8.1.160.0070.00019.11
8.1.150.0040.00418.84
8.1.140.0030.00318.77
8.1.130.0030.00520.11
8.1.120.0040.00417.57
8.1.110.0000.00817.57
8.1.100.0040.00417.38
8.1.90.0040.00417.57
8.1.80.0030.00517.55
8.1.70.0040.00417.51
8.1.60.0060.00317.68
8.1.50.0050.00317.62
8.1.40.0040.00417.48
8.1.30.0040.00417.64
8.1.20.0080.00017.60
8.1.10.0000.00717.68
8.1.00.0050.00317.48
8.0.300.0040.00420.09
8.0.290.0090.00016.75
8.0.280.0040.00418.34
8.0.270.0040.00417.05
8.0.260.0000.00618.40
8.0.250.0070.00017.16
8.0.240.0030.00317.04
8.0.230.0030.00317.06
8.0.220.0030.00317.01
8.0.210.0030.00316.87
8.0.200.0030.00317.04
8.0.190.0050.00317.10
8.0.180.0000.00816.98
8.0.170.0000.00917.00
8.0.160.0000.00716.87
8.0.150.0020.00516.89
8.0.140.0040.00416.94
8.0.130.0030.00313.35
8.0.120.0000.00816.97
8.0.110.0040.00416.84
8.0.100.0040.00416.91
8.0.90.0040.00416.88
8.0.80.0040.01116.96
8.0.70.0050.00216.80
8.0.60.0000.00717.00
8.0.50.0050.00317.04
8.0.30.0100.00717.32
8.0.20.0110.00817.08
8.0.10.0050.00317.21
8.0.00.0100.00716.68
7.4.330.0020.00215.55
7.4.320.0060.00016.76
7.4.300.0060.00016.69
7.4.290.0040.00416.73
7.4.280.0000.00716.59
7.4.270.0030.00316.72
7.4.260.0060.00013.43
7.4.250.0030.00516.61
7.4.240.0000.00716.73
7.4.230.0000.00816.55
7.4.220.0020.00616.76
7.4.210.0050.01216.67
7.4.200.0000.00816.72
7.4.130.0150.00516.70
7.4.120.0180.00416.38
7.4.110.0130.00616.75
7.4.100.0120.01016.82
7.4.90.0070.01016.61
7.4.80.0100.00719.39
7.4.70.0180.00716.63
7.4.60.0100.01416.62
7.4.50.0030.01816.85
7.4.40.0100.01016.61
7.4.30.0190.01316.56
7.4.20.0140.00616.60
7.4.10.0130.01016.70
7.4.00.0120.00616.52
7.3.330.0000.00716.18
7.3.320.0000.00613.11
7.3.310.0020.00516.38
7.3.300.0040.00416.25
7.3.290.0050.00916.36
7.3.280.0090.00816.24
7.3.260.0140.00716.51
7.3.240.0110.00816.55
7.3.230.0210.00016.40
7.3.210.0060.01216.66
7.3.200.0100.00716.60
7.3.190.0090.01716.58
7.3.180.0110.01316.61
7.3.170.0080.01116.62
7.3.160.0160.01216.77
7.3.150.0100.01316.40
7.3.140.0150.00516.70
7.3.130.0120.00916.44
7.3.120.0120.00916.43
7.3.110.0110.00816.30
7.3.100.0070.01716.31
7.3.90.0110.01116.68
7.3.80.0100.01116.57
7.3.70.0070.01316.48
7.3.60.0160.00916.52
7.3.50.0190.00016.46
7.3.40.0140.00916.31
7.3.30.0060.01516.30
7.3.20.0100.01216.43
7.3.10.0140.00616.44
7.3.00.0110.01416.47
7.2.330.0060.01216.77
7.2.310.0120.00916.83
7.2.300.0130.00716.57
7.2.290.0110.01816.64
7.2.280.0110.00916.79
7.2.270.0130.00916.67
7.2.260.0030.01616.71
7.2.250.0090.01216.69
7.2.240.0150.00416.57
7.2.230.0110.01116.79
7.2.220.0040.01716.62
7.2.210.0120.00916.65
7.2.200.0130.00716.59
7.2.190.0090.01216.55
7.2.180.0120.00616.55
7.2.170.0130.01016.65
7.2.160.0110.01416.59
7.2.150.0110.01116.53
7.2.140.0160.01016.53
7.2.130.0130.01016.61
7.2.120.0100.01016.47
7.2.110.0070.01316.74
7.2.100.0180.00816.62
7.2.90.0080.01616.64
7.2.80.0660.00716.60
7.2.70.0080.01616.60
7.2.60.0150.00616.68
7.2.50.0060.01816.61
7.2.40.0130.01016.70
7.2.30.0170.00816.75
7.2.20.0130.01316.60
7.2.10.0230.00416.80
7.2.00.0140.01016.84

preferences:
28.12 ms | 403 KiB | 5 Q