3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'goofe eas تان ک '.'ے عسکری ذرائع کے مطابق بدھ' ; echo iconv_substr( $string , 6 , null , 'utf-8' )."\n"; echo iconv_substr( $string , 6 , 4 , 'utf-8' )."\n"; echo iconv_substr( $string , 6 , -4 , 'utf-8' )."\n"; echo iconv_substr( $string , -4 , null , 'utf-8' )."\n"; echo "After setting internal encoding\n"; iconv_set_encoding("internal_encoding", "UTF-8"); echo iconv_substr( $string , 6 )."\n"; echo iconv_substr( $string , 6 , 4 )."\n"; echo iconv_substr( $string , 6 , -4 )."\n"; echo iconv_substr( $string , -4 )."\n"; exit(0);

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.31
8.3.50.0150.00521.27
8.3.40.0110.00418.79
8.3.30.0090.00620.17
8.3.20.0030.00620.24
8.3.10.0040.00420.92
8.3.00.0030.00522.39
8.2.180.0120.00916.63
8.2.170.0100.01022.96
8.2.160.0070.00722.08
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0040.00420.78
8.2.110.0070.00319.16
8.2.100.0000.01217.78
8.2.90.0040.00419.08
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0000.00917.80
8.2.50.0090.00018.07
8.2.40.0040.00418.21
8.2.30.0020.00519.58
8.2.20.0040.00417.67
8.2.10.0000.00817.85
8.2.00.0030.00517.85
8.1.280.0140.00025.92
8.1.270.0030.00623.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.59
8.1.230.0070.00420.85
8.1.220.0000.00918.77
8.1.210.0080.00419.09
8.1.200.0000.01017.23
8.1.190.0000.00917.43
8.1.180.0000.00818.10
8.1.170.0030.00618.49
8.1.160.0030.00518.91
8.1.150.0030.00718.71
8.1.140.0040.00417.39
8.1.130.0070.00017.91
8.1.120.0030.00617.56
8.1.110.0040.00417.50
8.1.100.0030.00517.50
8.1.90.0000.00817.40
8.1.80.0040.00317.53
8.1.70.0000.00717.46
8.1.60.0030.00617.57
8.1.50.0070.00017.59
8.1.40.0040.00417.54
8.1.30.0000.00817.67
8.1.20.0090.00017.57
8.1.10.0060.00317.58
8.1.00.0040.00417.48
8.0.300.0100.00020.15
8.0.290.0070.00017.18
8.0.280.0070.00018.48
8.0.270.0070.00017.31
8.0.260.0000.00717.03
8.0.250.0080.00217.05
8.0.240.0030.00617.05
8.0.230.0080.00017.07
8.0.220.0020.00516.98
8.0.210.0070.00017.01
8.0.200.0030.00316.88
8.0.190.0040.00417.11
8.0.180.0040.00416.99
8.0.170.0000.00816.93
8.0.160.0030.00416.98
8.0.150.0030.00516.86
8.0.140.0070.00016.87
8.0.130.0030.00313.31
8.0.120.0030.00617.07
8.0.110.0030.00617.10
8.0.100.0000.00916.98
8.0.90.0030.00617.07
8.0.80.0040.01917.17
8.0.70.0090.00017.07
8.0.60.0060.00317.07
8.0.50.0060.00317.11
8.0.30.0140.00817.21
8.0.20.0100.01017.44
8.0.10.0050.00517.08
8.0.00.0160.00916.96
7.4.330.0050.00016.73
7.4.320.0030.00316.59
7.4.300.0030.00316.59
7.4.290.0000.00716.59
7.4.280.0030.00316.57
7.4.270.0000.00716.57
7.4.260.0000.00513.18
7.4.250.0030.00616.54
7.4.240.0030.00616.67
7.4.230.0030.00616.53
7.4.220.0090.01316.66
7.4.210.0120.00716.67
7.4.200.0000.00916.62
7.4.190.0050.00516.66
7.4.150.0140.01417.40
7.4.140.0080.01417.86
7.4.130.0060.01416.64
7.4.120.0140.01116.64
7.4.110.0110.01116.63
7.4.100.0060.02216.46
7.4.90.0130.00816.59
7.4.80.0040.02119.39
7.4.70.0090.00916.57
7.4.60.0060.01216.54
7.4.50.0070.00416.61
7.4.40.0030.01422.77
7.4.30.0160.01016.54
7.4.00.0070.01114.96
7.3.330.0050.00013.05
7.3.320.0030.00312.96
7.3.310.0030.00616.40
7.3.300.0060.00316.33
7.3.290.0130.00616.48
7.3.280.0060.01216.49
7.3.270.0140.01117.40
7.3.260.0150.00918.24
7.3.250.0100.01016.64
7.3.240.0100.01016.45
7.3.230.0160.00416.68
7.3.210.0090.01216.52
7.3.200.0080.01419.39
7.3.190.0150.00516.66
7.3.180.0120.00916.46
7.3.170.0120.00616.50
7.3.160.0100.01416.82
7.3.120.0030.01315.13
7.2.330.0070.01416.79
7.2.320.0060.01516.60
7.2.310.0090.01516.52
7.2.300.0060.01316.64
7.2.290.0080.01116.76
7.2.60.0160.00317.04
7.2.00.0030.01219.12
7.1.200.0140.00715.61
7.1.100.0000.01417.92
7.1.70.0060.01217.21
7.1.60.0030.01319.17
7.1.50.0030.02317.11
7.1.00.0130.07022.50
7.0.200.0000.01116.91
7.0.140.0000.08022.16
7.0.60.0070.07720.04
7.0.50.0000.04317.99
7.0.40.0100.06020.40
7.0.30.0130.05320.29
7.0.20.0330.05720.16
7.0.10.0000.05020.19
7.0.00.0200.07720.48
5.6.210.0170.07320.65
5.6.200.0030.09018.45
5.6.190.0070.04720.52
5.6.180.0230.04720.61
5.6.170.0330.04020.59
5.6.160.0030.07320.54
5.6.150.0100.05718.29
5.6.140.0070.08318.27
5.6.130.0070.05718.29
5.6.120.0200.06721.18
5.6.110.0000.08721.12
5.6.100.0070.05021.05
5.6.90.0070.05021.19
5.6.80.0200.07720.42
5.5.350.4500.04020.44
5.5.340.0100.04318.16
5.5.330.0100.07720.37
5.5.320.0200.04720.50
5.5.310.0270.05320.44
5.5.300.0030.08018.18
5.5.290.0000.04718.18
5.5.280.0170.08020.86
5.5.270.0070.03721.00
5.5.260.0200.07720.89
5.5.250.0100.04320.79
5.5.240.0030.06720.39
5.4.450.0130.04319.60
5.4.440.0230.04319.57
5.4.430.0130.04319.54
5.4.420.0170.04319.57
5.4.410.0170.03719.28
5.4.400.0170.03719.09
5.4.390.0170.05019.33
5.4.380.0130.04019.25
5.4.370.0230.03019.25
5.4.360.0130.04019.29
5.4.350.0200.03319.12
5.4.340.0170.03719.32
5.4.320.0100.04319.38
5.4.310.0170.03719.10
5.4.300.0130.04019.24
5.4.290.0200.04019.10
5.4.280.0200.03319.05
5.4.270.0230.03019.25
5.4.260.0130.05019.25
5.4.250.0100.06019.32
5.4.240.0100.04719.30
5.4.230.0130.04019.32
5.4.220.0100.05718.94
5.4.210.0370.05719.05
5.4.200.0270.06719.09
5.4.190.0270.05019.07
5.4.180.0300.05019.24
5.4.170.0270.06019.40
5.4.160.0270.05019.38
5.4.150.0230.07319.20
5.4.140.0270.06716.48
5.4.130.0170.06316.53
5.4.120.0170.07316.60
5.4.110.0230.06016.68
5.4.100.0270.06716.55
5.4.90.0200.05316.60
5.4.80.0170.03716.58
5.4.70.0270.07016.58
5.4.60.0170.03716.60
5.4.50.0200.07316.66
5.4.40.0200.07016.68
5.4.30.0170.05316.54
5.4.20.0170.04016.57
5.4.10.0170.04316.41
5.4.00.0170.07316.02
5.3.290.0300.05314.78
5.3.280.0270.06714.77
5.3.270.0270.07714.86
5.3.260.0230.05314.78
5.3.250.0270.07014.86
5.3.240.0170.05014.73
5.3.230.0230.03314.70
5.3.220.0270.04714.68
5.3.210.0230.07314.57
5.3.200.0200.05314.57
5.3.190.0270.07314.82
5.3.180.0270.07014.66
5.3.170.0200.05714.61
5.3.160.0300.06714.68
5.3.150.0170.04314.59
5.3.140.0430.02714.66
5.3.130.0170.04314.77
5.3.120.0200.04014.57
5.3.110.0300.04314.65
5.3.100.0270.06314.14
5.3.90.0130.04014.13
5.3.80.0170.03714.01
5.3.70.0400.04014.01
5.3.60.0370.06014.18
5.3.50.0300.06313.88
5.3.40.0300.07314.09
5.3.30.0230.05714.09
5.3.20.0200.06013.80
5.3.10.0200.04013.77
5.3.00.0230.03713.78
5.2.170.0230.02312.19
5.2.160.0130.03712.19
5.2.150.0200.02712.19
5.2.140.0170.03312.19
5.2.130.0130.03012.19
5.2.120.0200.06312.19
5.2.110.0200.04712.19
5.2.100.0130.04012.19
5.2.90.0230.05712.19
5.2.80.0270.05312.19
5.2.70.0230.02312.19
5.2.60.0170.05712.19
5.2.50.0200.05012.19
5.2.40.0170.05712.19
5.2.30.0170.04712.19
5.2.20.0200.05712.19
5.2.10.0200.05712.19
5.2.00.0200.03712.19
5.1.60.0270.04312.19
5.1.50.0200.05012.19
5.1.40.0130.03712.19
5.1.30.0200.05312.19
5.1.20.0200.03712.19
5.1.10.0130.03012.19
5.1.00.0100.04312.19
5.0.50.0100.03012.19
5.0.40.0100.04012.19
5.0.30.0170.06312.19
5.0.20.0130.04012.19
5.0.10.0170.02012.19
5.0.00.0100.06012.19
4.4.90.0130.01712.19
4.4.80.0130.02712.19
4.4.70.0130.02012.19
4.4.60.0100.01012.19
4.4.50.0070.01712.19
4.4.40.0100.05012.19
4.4.30.0070.01712.19
4.4.20.0130.02712.19
4.4.10.0070.03712.19
4.4.00.0030.04012.19
4.3.110.0100.01712.19
4.3.100.0070.02012.19
4.3.90.0030.02712.19
4.3.80.0000.05012.19
4.3.70.0070.01712.19
4.3.60.0200.02012.19
4.3.50.0100.01712.19
4.3.40.0030.02712.19
4.3.30.0100.03012.19
4.3.20.0000.02012.19
4.3.10.0030.03012.19
4.3.00.0070.03312.19

preferences:
60.28 ms | 401 KiB | 5 Q