3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class UString { private $string = null; public function __construct(string $string) { $this->string = $string; } public function __toString() { return $this->string; } } echo strlen(new Ustring('Class with __string method !'));

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.0130.01016.38
8.3.50.0120.00721.01
8.3.40.0170.00319.04
8.3.30.0080.00618.88
8.3.20.0070.00020.25
8.3.10.0080.00023.64
8.3.00.0040.00419.81
8.2.180.0070.00718.29
8.2.170.0060.00822.96
8.2.160.0110.00420.35
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0030.00617.75
8.2.110.0070.00321.03
8.2.100.0050.00517.63
8.2.90.0000.00719.05
8.2.80.0030.00617.97
8.2.70.0030.00617.59
8.2.60.0000.01117.93
8.2.50.0080.00018.07
8.2.40.0000.00719.34
8.2.30.0000.00720.51
8.2.20.0060.00317.63
8.2.10.0000.00718.12
8.2.00.0000.00817.93
8.1.280.0100.00325.92
8.1.270.0150.00021.98
8.1.260.0000.00726.35
8.1.250.0030.00528.09
8.1.240.0030.00622.76
8.1.230.0030.00917.42
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.11
8.1.180.0040.00418.10
8.1.170.0060.00318.64
8.1.160.0040.00422.06
8.1.150.0040.00418.89
8.1.140.0040.00419.52
8.1.130.0000.00817.57
8.1.120.0000.00817.44
8.1.110.0030.00417.38
8.1.100.0040.00417.53
8.1.90.0030.00317.37
8.1.80.0040.00417.45
8.1.70.0030.00317.48
8.1.60.0050.00317.50
8.1.50.0000.00817.58
8.1.40.0030.00717.44
8.1.30.0080.00017.71
8.1.20.0000.00717.58
8.1.10.0030.00517.54
8.1.00.0040.00417.40
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00818.41
8.0.270.0040.00417.26
8.0.260.0020.00517.25
8.0.250.0000.00716.92
8.0.240.0000.00816.98
8.0.230.0030.00317.01
8.0.220.0070.00016.91
8.0.210.0000.00717.02
8.0.200.0070.00016.98
8.0.190.0000.00716.98
8.0.180.0040.00416.91
8.0.170.0070.00016.91
8.0.160.0040.00417.04
8.0.150.0050.00316.93
8.0.140.0030.00616.96
8.0.130.0030.00313.42
8.0.120.0080.00016.91
8.0.110.0000.00716.92
8.0.100.0000.00717.02
8.0.90.0000.00716.81
8.0.80.0060.00816.96
8.0.70.0000.00816.81
8.0.60.0050.00316.91
8.0.50.0040.00416.80
8.0.30.0110.00717.29
8.0.20.0110.00717.40
8.0.10.0040.00417.05
8.0.00.0150.00516.85
7.4.330.0030.00315.08
7.4.320.0000.00716.47
7.4.300.0000.00616.35
7.4.290.0030.00316.46
7.4.280.0030.00516.54
7.4.270.0060.00016.36
7.4.260.0040.00416.55
7.4.250.0000.00716.57
7.4.240.0010.00716.56
7.4.230.0030.00316.30
7.4.220.0100.00716.34
7.4.210.0090.00616.57
7.4.200.0040.00416.20
7.4.160.0060.00916.41
7.4.150.0090.01617.40
7.4.140.0140.01017.86
7.4.130.0050.01216.54
7.4.120.0090.00716.42
7.4.110.0060.01016.64
7.4.100.0040.02116.40
7.4.90.0110.00716.45
7.4.80.0070.01019.39
7.4.70.0160.00016.32
7.4.60.0160.00516.61
7.4.50.0040.00416.43
7.4.40.0130.00316.64
7.4.30.0120.00616.59
7.4.00.0050.01214.91
7.3.330.0000.00713.43
7.3.320.0020.00213.38
7.3.310.0040.00416.41
7.3.300.0030.00316.33
7.3.290.0080.01016.33
7.3.280.0070.01116.32
7.3.270.0100.00717.40
7.3.260.0100.01316.43
7.3.250.0120.00616.47
7.3.240.0070.01016.34
7.3.230.0130.00316.39
7.3.210.0110.00616.46
7.3.200.0100.00716.38
7.3.190.0030.01316.49
7.3.180.0100.00716.46
7.3.170.0060.01016.45
7.3.160.0080.01516.39
7.3.120.0000.01514.52
7.3.110.0100.01014.53
7.3.100.0000.01614.73
7.3.90.0040.00714.67
7.3.80.0000.01414.86
7.3.70.0060.00914.88
7.3.60.0040.00914.84
7.3.50.0030.01014.88
7.3.40.0090.00014.52
7.3.30.0000.01414.52
7.3.20.0000.00916.41
7.3.10.0030.00916.55
7.3.00.0000.01316.52
7.2.330.0080.01116.61
7.2.320.0060.01616.59
7.2.310.0060.01516.32
7.2.300.0100.00716.60
7.2.290.0140.00316.44
7.2.250.0030.01415.09
7.2.240.0030.01614.94
7.2.230.0030.01014.96
7.2.220.0070.00714.67
7.2.210.0060.00614.61
7.2.200.0130.00314.87
7.2.190.0040.01114.79
7.2.180.0040.00714.75
7.2.170.0000.01514.69
7.2.80.0000.01216.66
7.2.60.0140.00016.83
7.2.00.0070.01019.11
7.1.330.0100.00715.80
7.1.320.0030.01015.81
7.1.310.0040.01115.44
7.1.300.0000.01215.64
7.1.290.0120.00315.62
7.1.280.0000.01315.62
7.1.270.0000.01315.77
7.1.260.0060.00315.69
7.1.200.0070.00315.58
7.1.100.0000.01518.23
7.1.70.0000.00817.01
7.1.60.0000.01319.27
7.1.50.0120.00916.77
7.1.00.0070.07322.51
7.0.200.0000.00816.80
7.0.60.0070.08319.92
7.0.50.0030.04317.84
7.0.40.0100.06720.02
7.0.30.0500.08020.26
7.0.20.0100.06320.22
7.0.10.0070.07720.46
7.0.00.0070.08020.12
5.6.210.0130.07320.54
5.6.200.0100.07318.12
5.6.190.0070.07020.34
5.6.180.3130.04720.39
5.6.170.0330.07320.55
5.6.160.0030.08020.52
5.6.150.0170.07018.18
5.6.140.0130.07718.15
5.6.130.0030.05718.17
5.6.120.0100.04021.13
5.6.110.0070.08720.98
5.6.100.0000.09320.99
5.6.90.0100.07021.11
5.6.80.0070.06720.52
5.6.70.4100.03720.48
5.5.350.0100.08320.41
5.5.340.0100.07717.98
5.5.330.0170.07020.41
5.5.320.0130.05020.38
5.5.310.0230.04020.24
5.5.300.0130.06018.04
5.5.290.0100.10317.99
5.5.280.0170.07720.98
5.5.270.0100.04320.98
5.5.260.0100.07020.77
5.5.250.0100.08320.70
5.5.240.0200.07720.28
5.4.450.0870.06019.40
5.4.440.0830.06019.43
5.4.430.0870.05319.66
5.4.420.0900.05719.66
5.4.410.0770.06719.02
5.4.400.0930.05719.34
5.4.390.0700.06318.85
5.4.380.1070.06018.98
5.4.370.0870.05319.29
5.4.360.0900.05319.28
5.4.350.1070.07019.29
5.4.340.1070.07319.22
5.4.320.0830.05719.15
5.4.310.0730.05319.14
5.4.300.0930.04719.28
5.4.290.0900.05719.28
5.4.280.0930.06318.83
5.4.270.1030.06319.22
5.4.260.1030.04319.13
5.4.250.1000.05718.84
5.4.240.0830.05719.14
5.4.230.1030.05018.87
5.4.220.0800.05718.96
5.4.210.1030.06019.22
5.4.200.0970.06318.98
5.4.190.1030.03719.21
5.4.180.0770.05319.18
5.4.170.0870.05719.16
5.4.160.0800.07019.23
5.4.150.0800.07719.23
5.4.140.0900.05316.45
5.4.130.0970.05016.57
5.4.120.0870.05716.57
5.4.110.0930.06316.66
5.4.100.0800.05716.60
5.4.90.0930.05316.48
5.4.80.0870.05016.62
5.4.70.0230.05716.40
5.4.60.0400.05316.36
5.4.50.0000.04316.48
5.4.40.0100.06316.53
5.4.30.0030.07016.43
5.4.20.0300.02716.16

preferences:
59.31 ms | 401 KiB | 5 Q