3v4l.org

run code in 300+ PHP versions simultaneously
<?php # -*- coding: utf-8 -*- header('Content-Type: text/plain;charset=utf-8'); $string = 'Doppelgänger'; print 'strlen(): ' . strlen( $string ) . "\n"; print 'mb_strlen(): ' . mb_strlen( $string, 'utf8' ) . "\n\n"; print 'substr(): ' . substr( $string, 0, 8 ) . "\n"; print 'mb_substr(): ' . mb_substr( $string, 0, 8, 'utf8' );

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.0140.00718.43
8.3.50.0150.00921.09
8.3.40.0060.00918.50
8.3.30.0070.00720.34
8.3.20.0000.00720.34
8.3.10.0050.00321.09
8.3.00.0040.00422.40
8.2.180.0130.00616.74
8.2.170.0150.00022.96
8.2.160.0090.00422.29
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.01126.16
8.2.120.0080.00020.95
8.2.110.0070.00319.63
8.2.100.0040.00817.97
8.2.90.0020.00519.17
8.2.80.0050.00318.16
8.2.70.0090.00017.63
8.2.60.0050.00517.93
8.2.50.0090.00018.07
8.2.40.0000.00918.28
8.2.30.0040.00419.50
8.2.20.0080.00017.70
8.2.10.0040.00417.92
8.2.00.0040.00417.73
8.1.280.0000.01525.92
8.1.270.0080.00023.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.61
8.1.230.0080.00321.16
8.1.220.0060.00318.77
8.1.210.0040.00419.15
8.1.200.0040.00417.47
8.1.190.0000.00817.64
8.1.180.0000.00918.10
8.1.170.0000.00818.78
8.1.160.0040.00419.02
8.1.150.0040.00418.77
8.1.140.0000.00717.55
8.1.130.0070.00017.96
8.1.120.0090.00017.42
8.1.110.0000.00817.66
8.1.100.0040.00417.54
8.1.90.0040.00417.61
8.1.80.0000.00917.55
8.1.70.0030.00317.61
8.1.60.0040.00417.65
8.1.50.0080.00017.74
8.1.40.0000.00717.60
8.1.30.0040.00417.75
8.1.20.0050.00317.78
8.1.10.0040.00417.61
8.1.00.0040.00517.63
8.0.300.0040.00420.15
8.0.290.0040.00417.29
8.0.280.0050.00218.49
8.0.270.0030.00317.27
8.0.260.0030.00516.88
8.0.250.0000.00717.11
8.0.240.0060.00317.02
8.0.230.0040.00317.12
8.0.220.0030.00317.04
8.0.210.0030.00317.04
8.0.200.0060.00017.09
8.0.190.0030.00317.07
8.0.180.0040.00416.94
8.0.170.0000.00717.02
8.0.160.0050.00317.02
8.0.150.0030.00317.10
8.0.140.0050.00317.02
8.0.130.0000.00613.33
8.0.120.0040.00417.02
8.0.110.0040.00417.02
8.0.100.0040.00417.03
8.0.90.0070.00016.93
8.0.80.0030.01217.01
8.0.70.0040.00416.88
8.0.60.0050.00316.90
8.0.50.0000.00716.76
8.0.30.0090.00917.08
8.0.20.0090.01017.40
8.0.10.0070.00017.09
8.0.00.0110.00916.74
7.4.330.0000.00616.87
7.4.320.0030.00316.50
7.4.300.0030.00316.52
7.4.290.0070.00016.59
7.4.280.0070.00316.42
7.4.270.0030.00316.54
7.4.260.0030.00213.27
7.4.250.0060.00316.52
7.4.240.0030.00316.62
7.4.230.0070.00016.63
7.4.220.0100.01016.48
7.4.210.0090.00816.49
7.4.200.0000.00716.60
7.4.190.0070.00016.65
7.4.160.0090.00916.32
7.4.150.0150.00317.40
7.4.140.0050.01317.86
7.4.130.0030.01316.48
7.4.120.0110.00616.52
7.4.110.0120.00616.53
7.4.100.0140.00416.63
7.4.90.0080.00816.55
7.4.80.0060.01219.39
7.4.70.0030.01316.53
7.4.60.0120.00916.54
7.4.50.0040.00416.43
7.4.40.0090.00422.77
7.4.30.0070.01116.52
7.4.00.0150.00015.03
7.3.330.0000.00513.26
7.3.320.0030.00313.17
7.3.310.0030.00316.33
7.3.300.0040.00416.36
7.3.290.0030.01016.32
7.3.280.0100.00616.32
7.3.270.0100.00917.40
7.3.260.0090.00918.24
7.3.250.0110.00616.60
7.3.240.0100.00716.37
7.3.230.0110.00716.50
7.3.210.0060.01016.59
7.3.200.0130.00719.39
7.3.190.0180.00316.69
7.3.180.0070.01116.55
7.3.170.0150.00316.36
7.3.160.0100.01016.57
7.3.120.0090.00614.77
7.2.330.0090.00916.47
7.2.320.0190.00316.56
7.2.310.0070.01316.52
7.2.300.0130.00216.67
7.2.290.0040.01316.75
7.2.00.0000.01319.62
7.1.100.0080.00518.03
7.1.70.0000.01016.93
7.1.60.0060.01919.17
7.1.50.0070.01717.06
7.1.00.0030.06722.36
7.0.200.0200.00314.75
7.0.140.0130.06321.92
7.0.120.0200.05020.13
7.0.110.0230.06720.23
7.0.100.0170.06720.24
7.0.90.0200.04720.18
7.0.80.0200.06020.27
7.0.70.0170.05320.34
7.0.60.0230.08020.21
7.0.50.0130.06720.33
7.0.40.0100.07720.05
7.0.30.0070.05720.10
7.0.20.0130.07019.95
7.0.10.0030.06719.92
7.0.00.0100.08020.14
5.6.270.0100.07020.83
5.6.260.0100.05020.94
5.6.250.0130.08320.90
5.6.240.0100.04720.75
5.6.230.0100.04720.80
5.6.220.0130.05020.91
5.6.210.0100.07020.89
5.6.200.0130.08721.01
5.6.190.0030.04021.02
5.6.180.0000.04720.87
5.6.170.0030.03721.01
5.6.160.0130.04021.04
5.6.150.0070.07320.85
5.6.140.0100.08320.88
5.6.130.0130.05721.00
5.6.120.0070.09020.77
5.6.110.0070.06720.86
5.6.100.0130.08020.86
5.6.90.0070.06320.86
5.6.80.0170.06720.36
5.6.70.0070.05020.15
5.6.60.0270.05320.36
5.6.50.0170.04020.25
5.6.40.0000.05020.39
5.6.30.0030.05320.22
5.6.20.0170.03320.33
5.6.10.0000.04720.29
5.6.00.0070.03720.04
5.5.380.0070.08017.54
5.5.370.0030.08317.40
5.5.360.0100.07317.57
5.5.350.0030.04317.61
5.5.340.0130.04017.77
5.5.330.0030.08318.18
5.5.320.0070.03717.98
5.5.310.0070.06317.89
5.5.300.0030.04318.12
5.5.290.0100.06318.01
5.5.280.0070.06017.73
5.5.270.0070.08318.12
5.5.260.0070.03718.00
5.5.250.0130.06717.82
5.5.240.0100.07317.37
5.5.230.0030.05017.43
5.5.220.0100.07317.22
5.5.210.0000.05017.24
5.5.200.0070.03717.38
5.5.190.0000.05717.21
5.5.180.0030.05017.38
5.5.160.0030.03717.38
5.5.150.0030.04017.24
5.5.140.0100.06717.21
5.5.130.0070.03717.36
5.5.120.0030.05317.50
5.5.110.0030.05717.46
5.5.100.0070.08317.38
5.5.90.0030.07317.14
5.5.80.0070.07317.38
5.5.70.0100.07717.01
5.5.60.0070.03317.37
5.5.50.0000.03717.12
5.5.40.0070.04717.09
5.5.30.0000.04017.22
5.5.20.0000.04017.08
5.5.10.0000.04017.26
5.5.00.0030.08317.39
5.4.450.0070.06319.43
5.4.440.0030.07019.45
5.4.430.0130.05719.42
5.4.420.0070.06019.21
5.4.410.0070.06019.14
5.4.400.0030.07319.06
5.4.390.0100.06019.10
5.4.380.0130.06319.21
5.4.370.0130.06019.11
5.4.360.0070.06319.08
5.4.350.0100.04318.94
5.4.340.0030.03719.19
5.4.320.0030.07318.88
5.4.310.0030.04019.02
5.4.300.0070.03319.06
5.4.290.0070.03018.92
5.4.280.0070.03319.09
5.4.270.0030.05019.05
5.4.260.0070.05018.93
5.4.250.0070.07018.89
5.4.240.0130.06718.89
5.4.230.0070.03718.97
5.4.220.0000.05719.05
5.4.210.0000.03719.21
5.4.200.0000.07318.89
5.4.190.0000.04019.00
5.4.180.0030.03718.88
5.4.170.0000.04018.93
5.4.160.0030.04319.09
5.4.150.0070.07019.04
5.4.140.0100.05316.14
5.4.130.0070.03716.30
5.4.120.0030.03716.38
5.4.110.0030.03716.32
5.4.100.0030.07016.32
5.4.90.0070.04016.45
5.4.80.0000.03716.36
5.4.70.0000.04016.37
5.4.60.0070.03716.40
5.4.50.0000.03716.11
5.4.40.0000.06316.34
5.4.30.0070.03716.45
5.4.20.0070.03016.04
5.4.10.0070.03716.45
5.4.00.0000.04015.84
5.3.290.0100.04714.51
5.3.280.0070.05714.46
5.3.270.0030.04014.54
5.3.260.0030.03714.45
5.3.250.0030.03714.50
5.3.240.0000.04014.70
5.3.230.0030.03714.44
5.3.220.0000.05714.51
5.3.210.0000.05314.60
5.3.200.0030.03714.46
5.3.190.0000.04014.60
5.3.180.0000.04014.51
5.3.170.0100.03014.63
5.3.160.0000.04714.62
5.3.150.0030.04314.41
5.3.140.0030.03714.48
5.3.130.0030.05014.43
5.3.120.0000.03714.39
5.3.110.0000.04014.61
5.3.100.0070.03013.88
5.3.90.0070.06313.95
5.3.80.0030.07014.07
5.3.70.0130.02713.95
5.3.60.0030.03314.09
5.3.50.0100.02313.79
5.3.40.0130.04013.96
5.3.30.0030.07313.80
5.3.20.0070.05313.76
5.3.10.0030.03013.73
5.3.00.0100.03013.66
5.2.170.0070.03311.08
5.2.160.0030.02711.20
5.2.150.0030.03011.04
5.2.140.0100.03711.08
5.2.130.0070.04011.04
5.2.120.0030.05711.12
5.2.110.0030.04011.02
5.2.100.0070.05710.89
5.2.90.0000.03011.05
5.2.80.0000.05011.10
5.2.70.0030.05711.04
5.2.60.0000.05710.95
5.2.50.0030.05310.95
5.2.40.0030.02710.88
5.2.30.0100.02710.91
5.2.20.0000.04710.84
5.2.10.0000.02710.71
5.2.00.0100.04710.85
5.1.60.0070.02010.05
5.1.50.0030.02310.06
5.1.40.0030.0439.97
5.1.30.0030.03010.46
5.1.20.0070.03010.35
5.1.10.0030.02310.02
5.1.00.0030.03310.03
5.0.50.0000.0309.64
5.0.40.0000.0209.64
5.0.30.0000.0279.64
5.0.20.0000.0209.64
5.0.10.0000.0209.64
5.0.00.0030.0309.64
4.4.90.0030.0279.64
4.4.80.0000.0339.64
4.4.70.0000.0139.64
4.4.60.0000.0139.64
4.4.50.0070.0309.64
4.4.40.0100.0209.64
4.4.30.0000.0409.64
4.4.20.0000.0179.64
4.4.10.0000.0179.64
4.4.00.0000.0209.64
4.3.110.0000.0179.64
4.3.100.0030.0139.64
4.3.90.0000.0179.64
4.3.80.0000.0309.64
4.3.70.0000.0139.64
4.3.60.0030.0239.64
4.3.50.0000.0139.64
4.3.40.0000.0209.64
4.3.30.0000.0139.64
4.3.20.0000.0179.64
4.3.10.0000.0139.64
4.3.00.0000.0139.64

preferences:
49.38 ms | 401 KiB | 5 Q