3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input=10; $number = array('10','0','1','2','3','4','5','6','7','8','9'); $text = array('k','a','b','c','d','e','f','g','h','i','j'); $print = str_replace($number, $text, $input); echo $print;

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.0100.00718.43
8.3.50.0290.00821.93
8.3.40.0070.01018.54
8.3.30.0140.00019.01
8.3.20.0040.00420.22
8.3.10.0040.00421.76
8.3.00.0080.00018.92
8.2.180.0120.00618.41
8.2.170.0040.01122.96
8.2.160.0030.01022.25
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.66
8.2.110.0030.00622.11
8.2.100.0000.01217.91
8.2.90.0000.00719.17
8.2.80.0040.00417.97
8.2.70.0080.00317.63
8.2.60.0000.00818.04
8.2.50.0070.00418.07
8.2.40.0000.00919.95
8.2.30.0000.00718.14
8.2.20.0000.00817.61
8.2.10.0070.00018.16
8.2.00.0040.00417.81
8.1.280.0150.00625.92
8.1.270.0040.00418.79
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0050.00523.91
8.1.230.0060.00619.21
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0090.00017.13
8.1.190.0080.00017.10
8.1.180.0000.00818.10
8.1.170.0030.00618.61
8.1.160.0000.00821.94
8.1.150.0040.00418.78
8.1.140.0030.00519.21
8.1.130.0030.00517.73
8.1.120.0000.00717.28
8.1.110.0050.00317.38
8.1.100.0030.00317.34
8.1.90.0000.00717.40
8.1.80.0000.00717.34
8.1.70.0000.00717.39
8.1.60.0060.00317.39
8.1.50.0090.00017.39
8.1.40.0080.00017.45
8.1.30.0050.00517.50
8.1.20.0060.00317.43
8.1.10.0000.00817.46
8.1.00.0080.00017.41
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0070.00018.36
8.0.270.0070.00017.29
8.0.260.0060.00017.32
8.0.250.0040.00416.78
8.0.240.0000.00616.98
8.0.230.0040.00416.87
8.0.220.0000.00716.82
8.0.210.0000.00716.79
8.0.200.0040.00416.92
8.0.190.0000.00816.86
8.0.180.0040.00416.84
8.0.170.0040.00416.88
8.0.160.0030.00316.71
8.0.150.0030.00316.74
8.0.140.0000.00716.81
8.0.130.0000.00513.24
8.0.120.0040.00416.83
8.0.110.0040.00416.73
8.0.100.0040.00416.88
8.0.90.0050.00216.93
8.0.80.0060.00916.80
8.0.70.0080.00016.75
8.0.60.0040.00416.70
8.0.50.0040.00416.65
8.0.30.0100.01016.97
8.0.20.0100.00917.40
8.0.10.0040.00316.98
8.0.00.0090.00916.81
7.4.330.0030.00315.07
7.4.320.0000.00616.55
7.4.300.0000.00616.42
7.4.290.0070.00016.34
7.4.280.0040.00416.34
7.4.270.0060.00016.53
7.4.260.0000.00716.50
7.4.250.0080.00016.39
7.4.240.0050.00216.42
7.4.230.0040.00416.61
7.4.220.0070.01016.57
7.4.210.0100.01016.58
7.4.200.0030.00316.52
7.4.160.0090.00616.43
7.4.150.0060.01217.40
7.4.140.0070.01017.86
7.4.130.0100.00716.62
7.4.120.0090.00916.49
7.4.110.0000.01916.19
7.4.100.0090.01316.43
7.4.90.0070.01116.56
7.4.80.0110.01419.39
7.4.70.0120.01216.57
7.4.60.0130.00316.42
7.4.50.0030.00516.43
7.4.40.0120.00416.44
7.4.30.0120.00316.52
7.4.00.0050.01214.64
7.3.330.0000.00613.18
7.3.320.0000.00513.12
7.3.310.0070.00016.12
7.3.300.0000.00616.20
7.3.290.0110.00316.19
7.3.280.0050.01116.14
7.3.270.0170.00017.40
7.3.260.0130.00616.23
7.3.250.0080.01116.32
7.3.240.0080.00816.42
7.3.230.0120.00416.39
7.3.210.0110.00816.13
7.3.200.0020.00919.39
7.3.190.0030.01316.32
7.3.180.0120.00416.17
7.3.170.0140.00316.39
7.3.160.0030.01316.13
7.3.120.0090.00914.82
7.3.110.0030.01614.54
7.3.100.0080.00614.47
7.3.90.0030.00714.88
7.3.80.0060.00614.72
7.3.70.0060.00614.87
7.3.60.0070.01014.82
7.3.50.0030.00614.39
7.3.40.0060.00614.77
7.3.30.0100.00314.38
7.3.20.0070.00716.52
7.3.10.0100.00316.56
7.3.00.0080.00616.75
7.2.330.0100.00716.61
7.2.320.0080.00816.46
7.2.310.0060.01216.63
7.2.300.0120.00616.54
7.2.290.0070.01116.50
7.2.250.0080.00814.88
7.2.240.0060.01514.94
7.2.230.0030.01314.52
7.2.220.0060.00614.74
7.2.210.0060.00614.91
7.2.200.0070.00415.06
7.2.190.0030.01214.73
7.2.180.0000.01314.95
7.2.170.0050.00514.81
7.2.00.0090.00319.38
7.1.330.0030.01215.68
7.1.320.0040.00715.50
7.1.310.0110.00315.89
7.1.300.0030.01315.54
7.1.290.0070.00715.70
7.1.280.0000.01615.88
7.1.270.0030.01215.53
7.1.260.0040.00715.69
7.1.100.0090.00318.20
7.1.70.0040.00417.12
7.1.60.0100.01619.46
7.1.50.0060.01616.86
7.1.00.0030.07322.51
7.0.200.0040.00416.46
7.0.140.0030.06022.00
7.0.60.0100.06320.07
7.0.50.0030.06317.80
7.0.40.0000.04720.32
7.0.30.0100.05320.00
7.0.20.0300.08020.13
7.0.10.0070.05320.16
7.0.00.0030.04319.99
5.6.280.0170.06020.92
5.6.210.0070.04020.66
5.6.200.0070.07018.15
5.6.190.0070.04720.35
5.6.180.0500.07320.61
5.6.170.0200.05320.53
5.6.160.0100.06720.48
5.6.150.0100.05018.13
5.6.140.0000.08018.18
5.6.130.0030.07718.14
5.6.120.0070.06321.02
5.6.110.0070.07321.11
5.6.100.0070.08320.88
5.6.90.0030.07320.97
5.6.80.0100.08020.50
5.5.350.4300.04020.43
5.5.340.0030.05317.99
5.5.330.0030.04020.37
5.5.320.2130.04020.24
5.5.310.0470.06320.17
5.5.300.0100.08017.93
5.5.290.0030.08317.95
5.5.280.0070.04320.77
5.5.270.0030.08720.66
5.5.260.0130.07020.84
5.5.250.0130.07720.61
5.5.240.0030.08020.29
5.4.450.0230.05019.25
5.4.440.0130.06019.24
5.4.430.0070.06019.31
5.4.420.0270.04719.46
5.4.410.0230.04319.25
5.4.400.0070.05719.23
5.4.390.0170.05718.59
5.4.380.0270.04718.63
5.4.370.0170.05318.73
5.4.360.0200.05018.50
5.4.350.0170.05718.70
5.4.340.0170.05318.68
5.4.320.0230.04718.70
5.4.310.0170.05318.70
5.4.300.0270.04318.71
5.4.290.0270.04318.67
5.4.280.0170.05318.52
5.4.270.0130.05718.77
5.4.260.0230.04718.67
5.4.250.0170.05718.46
5.4.240.0130.06018.58
5.4.230.0170.05318.68
5.4.220.0230.05018.65
5.4.210.0230.05318.58
5.4.200.0230.05016.53
5.4.190.0230.05018.69
5.4.180.0100.06018.70
5.4.170.0170.06718.48
5.4.160.0270.05018.48
5.4.150.0300.04718.63
5.4.140.0400.03316.17
5.4.130.0200.04716.23
5.4.120.0200.05316.27
5.4.110.0200.04716.07
5.4.100.0270.04716.19
5.4.90.0170.06016.15
5.4.80.0200.05016.12
5.4.70.0400.03016.15
5.4.60.0170.05016.24
5.4.50.0130.05716.14
5.4.40.0230.04716.24
5.4.30.0170.05316.02
5.4.20.0130.05716.26
5.4.10.0170.05016.18
5.4.00.0130.05315.62
5.3.290.0130.06014.70
5.3.280.0230.04714.67
5.3.270.0130.05714.59
5.3.260.0230.04714.52
5.3.250.0230.04714.64
5.3.240.0230.04714.61
5.3.230.0200.05014.51
5.3.220.0230.05314.54
5.3.210.0230.05714.50
5.3.200.0070.06314.52
5.3.190.0170.05314.48
5.3.180.0170.05314.60
5.3.170.0200.05314.56
5.3.160.0130.05314.61
5.3.150.0170.05314.55
5.3.140.0200.05014.53
5.3.130.0200.05714.56
5.3.120.0170.05714.58
5.3.110.0100.06014.53
5.3.100.0170.05314.04
5.3.90.0200.05014.02
5.3.80.0230.05313.96
5.3.70.0200.05013.94
5.3.60.0130.05313.98
5.3.50.0300.04013.89
5.3.40.0200.06014.02
5.3.30.0200.06013.83
5.3.20.0200.04313.67
5.3.10.0230.04713.63
5.3.00.0170.05313.64
5.2.170.0230.03311.09
5.2.160.0130.04311.13
5.2.150.0200.04311.21
5.2.140.0170.04711.13
5.2.130.0130.04311.08
5.2.120.0130.04311.05
5.2.110.0200.04011.27
5.2.100.0170.03711.06
5.2.90.0130.04311.14
5.2.80.0200.04011.03
5.2.70.0230.03311.23
5.2.60.0130.05010.96
5.2.50.0130.05011.16
5.2.40.0200.03311.03
5.2.30.0170.03710.93
5.2.20.0130.04710.91
5.2.10.0100.04310.98
5.2.00.0130.04010.73
5.1.60.0070.03710.07
5.1.50.0200.04010.04
5.1.40.0130.03310.17
5.1.30.0200.02710.55
5.1.20.0130.04010.39
5.1.10.0130.03710.20
5.1.00.0170.03310.16
5.0.50.0070.0338.73
5.0.40.0070.0278.48
5.0.30.0070.0478.41
5.0.20.0070.0308.39
5.0.10.0170.0208.27
5.0.00.0170.0338.18
4.4.90.0000.0305.91
4.4.80.0000.0275.82
4.4.70.0170.0135.89
4.4.60.0070.0236.00
4.4.50.0100.0205.98
4.4.40.0070.0375.89
4.4.30.0030.0275.91
4.4.20.0130.0275.94
4.4.10.0070.0305.95
4.4.00.0030.0436.02
4.3.110.0030.0275.83
4.3.100.0100.0205.83
4.3.90.0030.0275.79
4.3.80.0100.0305.82
4.3.70.0100.0175.79
4.3.60.0100.0175.89
4.3.50.0070.0235.78
4.3.40.0070.0335.77
4.3.30.0100.0204.54
4.3.20.0100.0204.53
4.3.10.0030.0204.57
4.3.00.0070.0278.73

preferences:
54.55 ms | 401 KiB | 5 Q