3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "087777807209"; // Original string $replacement = "62"; // What you want to replace the last character with // The final string $final = $replacement.substr($string, 0, 0); echo $final;

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.0070.00716.38
8.3.50.0120.00616.15
8.3.40.0110.00418.45
8.3.30.0090.00618.64
8.3.20.0040.00420.25
8.3.10.0000.00723.65
8.3.00.0000.00823.56
8.2.180.0090.00618.05
8.2.170.0110.00318.82
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00422.08
8.2.120.0000.00826.35
8.2.110.0090.00019.30
8.2.100.0090.00318.09
8.2.90.0000.00819.28
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0050.00318.03
8.2.50.0040.00418.16
8.2.40.0040.00420.55
8.2.30.0000.00820.96
8.2.20.0070.00018.03
8.2.10.0040.00418.03
8.2.00.0040.00417.95
8.1.280.0150.00625.92
8.1.270.0040.01121.84
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.00622.68
8.1.230.0030.00720.32
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0000.00817.35
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0050.00318.62
8.1.160.0030.00318.74
8.1.150.0040.00720.07
8.1.140.0050.00219.05
8.1.130.0030.00718.91
8.1.120.0030.00317.44
8.1.110.0000.00817.41
8.1.100.0040.00417.30
8.1.90.0000.00817.36
8.1.80.0040.00417.26
8.1.70.0030.00317.29
8.1.60.0040.00417.51
8.1.50.0040.00417.46
8.1.40.0050.00317.45
8.1.30.0000.00817.54
8.1.20.0040.00417.44
8.1.10.0030.00617.44
8.1.00.0040.00417.45
8.0.300.0040.00718.77
8.0.290.0000.00716.75
8.0.280.0070.00018.34
8.0.270.0070.00017.22
8.0.260.0000.00720.73
8.0.250.0000.00616.83
8.0.240.0040.00416.87
8.0.230.0070.00016.96
8.0.220.0040.00416.80
8.0.210.0020.00516.74
8.0.200.0020.00516.94
8.0.190.0040.00416.91
8.0.180.0070.00016.89
8.0.170.0000.00716.93
8.0.160.0000.00716.74
8.0.150.0040.00416.86
8.0.140.0040.00416.73
8.0.130.0000.00513.31
8.0.120.0040.00416.84
8.0.110.0040.00416.77
8.0.100.0040.00416.76
8.0.90.0040.00416.67
8.0.80.0090.00616.86
8.0.70.0000.00716.89
8.0.60.0070.00016.73
8.0.50.0070.00016.74
8.0.30.0100.01116.96
8.0.20.0090.01017.40
8.0.10.0040.00416.74
8.0.00.0140.00316.52
7.4.330.0000.00515.55
7.4.320.0070.00016.49
7.4.300.0000.00616.43
7.4.290.0090.00016.54
7.4.280.0040.00416.51
7.4.270.0000.00716.53
7.4.260.0080.00316.42
7.4.250.0040.00416.29
7.4.240.0000.00716.39
7.4.230.0040.00416.34
7.4.220.0110.01516.48
7.4.210.0120.00416.49
7.4.200.0030.00316.42
7.4.160.0100.00516.54
7.4.150.0160.00017.40
7.4.140.0100.00717.86
7.4.130.0140.00416.44
7.4.120.0130.00716.39
7.4.110.0100.00716.52
7.4.100.0090.01216.51
7.4.90.0030.01416.49
7.4.80.0030.01319.39
7.4.70.0190.00416.39
7.4.60.0070.01016.32
7.4.50.0060.00616.45
7.4.40.0090.00616.25
7.4.30.0060.01016.45
7.4.10.0070.01314.58
7.4.00.0070.00814.79
7.3.330.0020.00213.02
7.3.320.0060.00013.04
7.3.310.0050.00316.14
7.3.300.0000.00716.20
7.3.290.0030.00316.24
7.3.280.0070.01016.22
7.3.270.0140.00717.40
7.3.260.0130.00716.34
7.3.250.0100.00716.33
7.3.240.0070.01016.21
7.3.230.0120.00416.27
7.3.210.0090.00916.57
7.3.200.0130.00316.36
7.3.190.0100.00716.30
7.3.180.0090.00616.56
7.3.170.0040.01116.30
7.3.160.0060.00916.08
7.3.130.0000.01814.69
7.3.120.0080.00814.71
7.3.110.0070.01014.46
7.3.100.0030.01014.55
7.3.90.0090.00414.78
7.3.80.0030.01414.69
7.3.70.0100.00714.62
7.3.60.0070.01014.55
7.3.50.0000.01314.63
7.3.40.0110.00414.77
7.3.30.0040.01114.71
7.3.20.0040.01516.43
7.3.10.0040.01416.67
7.3.00.0100.00616.46
7.2.330.0130.01016.70
7.2.320.0090.00816.59
7.2.310.0120.00916.38
7.2.300.0110.00716.38
7.2.290.0080.00816.43
7.2.260.0130.00614.60
7.2.250.0070.01014.97
7.2.240.0030.01314.90
7.2.230.0080.00814.75
7.2.220.0060.01314.95
7.2.210.0040.00915.08
7.2.200.0080.01114.68
7.2.190.0070.01114.66
7.2.180.0030.01314.95
7.2.170.0070.01015.05
7.2.160.0030.01014.81
7.2.150.0040.01116.63
7.2.140.0030.01016.59
7.2.130.0040.01216.83
7.2.120.0090.00316.91
7.2.110.0040.01416.42
7.2.100.0040.01116.95
7.2.90.0030.01616.75
7.2.80.0110.01116.92
7.2.70.0080.00617.00
7.2.60.0090.00716.65
7.2.50.0050.00516.75
7.2.40.0040.01116.87
7.2.30.0000.01517.03
7.2.20.0000.01816.91
7.2.10.0070.00716.86
7.2.00.0070.00716.68
7.1.330.0000.01416.00
7.1.320.0140.00415.75
7.1.310.0030.01016.01
7.1.300.0080.00815.94
7.1.290.0120.00315.77
7.1.280.0040.01115.62
7.1.270.0030.01315.65
7.1.260.0000.01315.95
7.1.250.0090.00615.61
7.1.240.0030.01315.75
7.1.230.0120.00415.79
7.1.220.0080.00415.79
7.1.210.0120.00915.90
7.1.200.0050.01115.82
7.1.190.0050.00515.95
7.1.180.0070.00715.73
7.1.170.0090.00315.61
7.1.160.0030.00715.72
7.1.150.0000.01415.96
7.1.140.0040.01115.97
7.1.130.0080.00415.46
7.1.120.0060.00615.77
7.1.110.0180.01315.97
7.1.100.0160.01016.12
7.1.90.0280.00815.85
7.1.80.0210.01215.98
7.1.70.0190.00615.54
7.1.60.0250.00824.62
7.1.50.0230.01024.48
7.1.40.0310.00824.21
7.1.30.0340.01424.24
7.1.20.0250.01124.33
7.1.10.0160.01315.12
7.1.00.0300.00915.25
7.0.330.0060.00915.26
7.0.320.0030.00615.42
7.0.310.0090.00315.22
7.0.300.0070.01015.45
7.0.290.0030.00515.15
7.0.280.0070.00715.21
7.0.270.0050.00515.43
7.0.260.0090.00615.53
7.0.250.0150.00815.51
7.0.240.0170.00715.50
7.0.230.0260.01115.63
7.0.220.0170.01015.59
7.0.210.0320.00215.25
7.0.200.0240.01015.20
7.0.190.0230.01215.26
7.0.180.0250.00814.88
7.0.170.0240.01014.79
7.0.160.0180.00814.85
7.0.150.0230.00314.97
7.0.140.0160.01215.01
7.0.130.0280.00814.95
7.0.120.0180.00814.98
7.0.110.0230.00615.07
7.0.100.0260.01214.99
7.0.90.0180.01015.06
7.0.80.0190.00914.78
7.0.70.0150.01014.97
7.0.60.0220.00714.84
7.0.50.0290.01215.00
7.0.40.0230.01314.05
7.0.30.0270.01013.98
7.0.20.0280.00914.07
7.0.10.0410.00914.07
7.0.00.0420.01114.00
5.6.400.0060.00314.10
5.6.390.0090.00914.32
5.6.380.0100.00714.07
5.6.370.0080.00314.52
5.6.360.0070.00414.41
5.6.350.0050.00514.05
5.6.340.0070.01014.36
5.6.330.0000.01014.23
5.6.320.0040.01114.53
5.6.310.0120.00614.10
5.6.300.0060.00914.41
5.6.290.0090.00014.21
5.6.280.0070.00414.25
5.6.270.0090.00914.05
5.6.260.0040.01414.36
5.6.250.0040.00714.38
5.6.240.0060.00314.23
5.6.230.0080.00014.33
5.6.220.0060.00613.95
5.6.210.0030.00714.23
5.6.200.0110.00614.34
5.6.190.0150.00414.26
5.6.180.0070.00414.25
5.6.170.0000.01514.04
5.6.160.0110.00414.36
5.6.150.0030.01014.02
5.6.140.0080.00414.24
5.6.130.0030.01013.98
5.6.120.0040.00814.16
5.6.110.0070.00713.92
5.6.100.0070.00714.15
5.6.90.0090.00614.37
5.6.80.0000.01014.42
5.6.70.0150.00014.08
5.6.60.0090.00614.47
5.6.50.0100.00314.21
5.6.40.0060.00614.45
5.6.30.0030.00614.08
5.6.20.0060.00614.20
5.6.10.0040.00814.41
5.6.00.0000.01414.07

preferences:
62.5 ms | 400 KiB | 5 Q