3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input= (string)"102"; $number = array('0','1','2','3','4','5','6','7','8','9','10'); $text = array('a','b','c','d','e','f','g','h','i','j','k'); $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.0120.00918.55
8.3.50.0120.01021.92
8.3.40.0170.00018.67
8.3.30.0070.00719.02
8.3.20.0040.00420.30
8.3.10.0070.00021.61
8.3.00.0050.00318.96
8.2.180.0080.01216.50
8.2.170.0070.00722.96
8.2.160.0100.00322.31
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00019.79
8.2.110.0060.00322.14
8.2.100.0110.00017.91
8.2.90.0000.00719.11
8.2.80.0080.00017.97
8.2.70.0090.00317.38
8.2.60.0060.00318.04
8.2.50.0030.00718.07
8.2.40.0070.00319.88
8.2.30.0040.00418.13
8.2.20.0040.00417.78
8.2.10.0000.00918.11
8.2.00.0000.00717.65
8.1.280.0140.00325.92
8.1.270.0040.00418.95
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0040.00719.09
8.1.220.0000.00717.74
8.1.210.0050.00318.77
8.1.200.0030.00717.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0000.00918.51
8.1.160.0040.00421.89
8.1.150.0000.00718.72
8.1.140.0000.01017.37
8.1.130.0000.00817.72
8.1.120.0000.00717.32
8.1.110.0040.00417.38
8.1.100.0000.00717.43
8.1.90.0050.00217.29
8.1.80.0030.00317.20
8.1.70.0030.00317.30
8.1.60.0000.00817.56
8.1.50.0030.00517.52
8.1.40.0060.00317.40
8.1.30.0070.00317.64
8.1.20.0000.01017.60
8.1.10.0000.00717.49
8.1.00.0030.00617.45
8.0.300.0080.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00818.36
8.0.270.0000.00717.24
8.0.260.0030.00318.42
8.0.250.0070.00016.99
8.0.240.0060.00017.03
8.0.230.0030.00516.94
8.0.220.0030.00316.89
8.0.210.0030.00316.84
8.0.200.0030.00316.98
8.0.190.0030.00516.82
8.0.180.0040.00416.96
8.0.170.0000.00816.94
8.0.160.0030.00316.93
8.0.150.0030.00416.72
8.0.140.0040.00416.88
8.0.130.0000.00513.37
8.0.120.0040.00416.70
8.0.110.0030.00516.81
8.0.100.0050.00316.81
8.0.90.0080.00016.74
8.0.80.0030.01216.81
8.0.70.0030.00616.70
8.0.60.0020.00516.75
8.0.50.0000.00716.89
8.0.30.0170.00616.94
8.0.20.0170.00517.40
8.0.10.0000.00716.79
8.0.00.0090.00816.58
7.4.330.0000.00515.03
7.4.320.0030.00316.50
7.4.300.0060.00016.48
7.4.290.0030.00316.57
7.4.280.0050.00316.48
7.4.270.0070.00016.44
7.4.260.0000.01016.31
7.4.250.0070.00016.51
7.4.240.0030.00316.36
7.4.230.0070.00016.54
7.4.220.0100.00616.52
7.4.210.0060.00916.59
7.4.200.0040.00416.31
7.4.160.0100.00616.43
7.4.150.0090.00917.40
7.4.140.0120.00817.86
7.4.130.0080.01016.38
7.4.120.0110.00716.35
7.4.110.0060.01216.36
7.4.100.0100.00816.24
7.4.90.0040.01316.50
7.4.80.0110.00619.39
7.4.70.0150.00716.43
7.4.60.0140.00416.38
7.4.50.0040.00416.18
7.4.40.0070.01016.41
7.4.30.0090.01216.53
7.4.00.0020.01514.91
7.3.330.0030.00313.18
7.3.320.0030.00313.24
7.3.310.0070.00016.39
7.3.300.0030.00316.30
7.3.290.0090.00516.27
7.3.280.0080.00816.29
7.3.270.0090.01217.40
7.3.260.0110.01116.30
7.3.250.0080.00816.39
7.3.240.0100.00716.19
7.3.230.0080.02216.39
7.3.210.0100.00616.14
7.3.200.0100.00719.39
7.3.190.0040.01216.33
7.3.180.0100.00616.42
7.3.170.0130.00916.30
7.3.160.0070.00716.33
7.3.120.0130.00614.57
7.3.110.0070.00714.73
7.3.100.0060.01014.65
7.3.90.0040.01214.70
7.3.80.0040.01214.74
7.3.70.0070.00314.88
7.3.60.0040.00714.86
7.3.50.0070.00314.80
7.3.40.0090.00014.72
7.3.30.0060.00314.82
7.3.20.0170.00016.55
7.3.10.0080.00416.85
7.3.00.0000.01516.65
7.2.330.0090.00916.50
7.2.320.0100.00716.59
7.2.310.0050.01416.44
7.2.300.0080.01116.25
7.2.290.0110.00716.71
7.2.250.0100.00715.00
7.2.240.0030.01615.16
7.2.230.0100.00715.12
7.2.220.0090.00614.91
7.2.210.0080.00814.75
7.2.200.0070.00715.05
7.2.190.0030.01214.93
7.2.180.0070.00714.93
7.2.170.0030.01015.07
7.2.00.0090.00919.35
7.1.330.0040.01215.87
7.1.320.0000.01215.64
7.1.310.0040.01115.75
7.1.300.0070.00315.79
7.1.290.0080.00415.92
7.1.280.0070.00315.37
7.1.270.0090.00315.82
7.1.260.0080.00815.55
7.1.200.0060.00615.87
7.1.100.0030.01018.07
7.1.70.0030.00617.00
7.1.60.0110.01419.46
7.1.50.0100.01317.08
7.1.00.0030.07322.44
7.0.200.0040.00416.68
7.0.140.0070.04022.09
7.0.60.0030.08019.92
7.0.50.0070.07717.81
7.0.40.0100.03720.03
7.0.30.0170.04020.13
7.0.20.0300.07720.02
7.0.10.0170.07719.99
7.0.00.0030.04020.34
5.6.280.0100.06720.78
5.6.210.0070.08020.72
5.6.200.0030.04018.22
5.6.190.0100.03720.47
5.6.180.0500.06320.48
5.6.170.0270.04020.38
5.6.160.0030.04320.54
5.6.150.0100.07718.21
5.6.140.0100.03718.07
5.6.130.0130.08018.14
5.6.120.0030.08021.14
5.6.110.0000.04321.13
5.6.100.0170.08020.97
5.6.90.0070.08021.12
5.6.80.0070.04320.28
5.5.350.4230.04020.40
5.5.340.0070.03718.02
5.5.330.0030.04020.19
5.5.320.2430.04020.18
5.5.310.0270.08020.20
5.5.300.0100.06717.98
5.5.290.0030.05717.91
5.5.280.0070.05020.97
5.5.270.0030.09020.75
5.5.260.0070.05720.75
5.5.250.0070.06720.69
5.5.240.0030.04020.16
5.4.450.0530.06319.42
5.4.440.0230.05319.13
5.4.430.0200.04719.63
5.4.420.0070.06019.31
5.4.410.0070.05719.26
5.4.400.0100.05319.16
5.4.390.0130.06318.63
5.4.380.0230.04718.74
5.4.370.0230.05718.70
5.4.360.0130.06018.70
5.4.350.0200.05318.52
5.4.340.0100.06318.54
5.4.320.0230.07318.61
5.4.310.0130.05718.67
5.4.300.0100.06018.68
5.4.290.0170.05318.56
5.4.280.0170.05318.72
5.4.270.0230.06018.67
5.4.260.0230.04718.62
5.4.250.0330.05018.77
5.4.240.0230.07318.65
5.4.230.0230.04718.70
5.4.220.0130.06018.67
5.4.210.0170.05718.66
5.4.200.0130.05316.53
5.4.190.0100.06018.50
5.4.180.0200.05018.57
5.4.170.0070.06718.61
5.4.160.0300.04718.56
5.4.150.0200.05318.71
5.4.140.0130.05716.33
5.4.130.0230.04316.14
5.4.120.0100.05716.36
5.4.110.0100.05316.23
5.4.100.0170.05016.29
5.4.90.0270.04316.07
5.4.80.0230.05316.04
5.4.70.0200.05716.28
5.4.60.0170.05716.11
5.4.50.0330.03716.23
5.4.40.0100.06716.22
5.4.30.0170.05016.04
5.4.20.0170.07316.33
5.4.10.0200.06716.22
5.4.00.0200.04715.71
5.3.290.0170.05714.63
5.3.280.0300.04014.63
5.3.270.0200.05014.58
5.3.260.0130.06014.60
5.3.250.0130.05714.52
5.3.240.0200.05014.55
5.3.230.0270.04314.53
5.3.220.0170.05314.50
5.3.210.0200.04714.55
5.3.200.0200.05314.66
5.3.190.0270.04714.57
5.3.180.0230.04714.54
5.3.170.0200.05014.64
5.3.160.0200.05714.55
5.3.150.0230.05014.61
5.3.140.0200.05314.46
5.3.130.0170.05314.60
5.3.120.0070.06314.54
5.3.110.0130.05714.51
5.3.100.0200.05014.11
5.3.90.0170.05313.98
5.3.80.0200.05013.95
5.3.70.0130.05313.93
5.3.60.0200.04713.94
5.3.50.0130.05313.96
5.3.40.0330.03313.93
5.3.30.0130.05313.84
5.3.20.0230.04313.79
5.3.10.0230.04313.57
5.3.00.0130.05313.60
5.2.170.0130.04311.20
5.2.160.0100.04311.14
5.2.150.0270.02711.11
5.2.140.0100.04311.13
5.2.130.0130.04011.13
5.2.120.0170.04011.02
5.2.110.0170.03711.11
5.2.100.0130.04011.06
5.2.90.0170.04011.05
5.2.80.0100.05011.13
5.2.70.0130.04711.12
5.2.60.0200.03711.02
5.2.50.0100.04311.07
5.2.40.0100.04311.03
5.2.30.0100.04711.01
5.2.20.0130.03710.89
5.2.10.0200.03010.90
5.2.00.0170.03710.81
5.1.60.0130.03010.06
5.1.50.0100.0379.99
5.1.40.0100.0509.94
5.1.30.0130.03710.34
5.1.20.0100.04010.37
5.1.10.0100.03710.17
5.1.00.0230.03010.10
5.0.50.0030.0338.59
5.0.40.0030.0308.41
5.0.30.0030.0478.30
5.0.20.0070.0278.18
5.0.10.0070.0308.36
5.0.00.0170.0478.23
4.4.90.0070.0335.91
4.4.80.0070.0335.89
4.4.70.0000.0275.87
4.4.60.0030.0235.89
4.4.50.0070.0205.89
4.4.40.0030.0375.89
4.4.30.0070.0205.88
4.4.20.0030.0235.96
4.4.10.0070.0205.96
4.4.00.0030.0375.91
4.3.110.0070.0205.82
4.3.100.0100.0205.84
4.3.90.0000.0375.80
4.3.80.0000.0405.79
4.3.70.0000.0275.83
4.3.60.0170.0105.82
4.3.50.0070.0235.90
4.3.40.0070.0335.75
4.3.30.0030.0234.55
4.3.20.0030.0234.62
4.3.10.0000.0234.49
4.3.00.0100.0238.73

preferences:
46.03 ms | 401 KiB | 5 Q