3v4l.org

run code in 300+ PHP versions simultaneously
<?php class LazyLabel { private $string1; private $string2; function __construct(&$string1, &$string2) { $this->string1 = & $string1; $this->string2 = & $string2; } function __toString() { $return = (string)$this->string1 . (string)$this->string2; return $return; } } $a = 'foo'; $b = 'bar'; $c = new LazyLabel($a, $b); echo $c . "\n"; $b = 'baz'; echo $c;

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.0080.00618.31
8.3.50.0090.00722.06
8.3.40.0140.00718.99
8.3.30.0080.00619.22
8.3.20.0000.00720.29
8.3.10.0080.00021.80
8.3.00.0070.00020.76
8.2.180.0090.00616.38
8.2.170.0040.01122.96
8.2.160.0070.00720.89
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0070.00319.30
8.2.100.0060.00617.91
8.2.90.0080.00019.22
8.2.80.0030.00517.97
8.2.70.0080.00017.38
8.2.60.0030.00518.16
8.2.50.0000.00818.07
8.2.40.0060.00318.34
8.2.30.0000.00818.12
8.2.20.0000.00717.73
8.2.10.0070.00017.73
8.2.00.0030.00517.65
8.1.280.0070.00725.92
8.1.270.0040.00423.97
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00021.31
8.1.230.0080.00417.52
8.1.220.0040.00417.91
8.1.210.0000.00818.77
8.1.200.0030.00617.25
8.1.190.0080.00017.36
8.1.180.0050.00318.10
8.1.170.0080.00018.59
8.1.160.0030.00622.03
8.1.150.0030.00618.71
8.1.140.0040.00417.49
8.1.130.0070.00017.83
8.1.120.0040.00417.50
8.1.110.0070.00317.36
8.1.100.0050.00217.47
8.1.90.0000.00717.38
8.1.80.0000.00817.46
8.1.70.0080.00017.41
8.1.60.0080.00017.47
8.1.50.0030.00517.50
8.1.40.0000.00817.58
8.1.30.0090.00017.63
8.1.20.0030.00517.55
8.1.10.0000.00817.56
8.1.00.0000.00717.54
8.0.300.0060.00318.77
8.0.290.0030.00616.75
8.0.280.0070.00018.46
8.0.270.0030.00317.22
8.0.260.0030.00316.74
8.0.250.0030.00316.84
8.0.240.0000.00716.83
8.0.230.0030.00316.87
8.0.220.0000.00616.80
8.0.210.0000.00716.93
8.0.200.0000.00616.95
8.0.190.0000.00716.82
8.0.180.0040.00416.92
8.0.170.0050.00316.96
8.0.160.0040.00416.87
8.0.150.0030.00416.86
8.0.140.0070.00016.84
8.0.130.0000.00513.32
8.0.120.0040.00416.93
8.0.110.0050.00216.80
8.0.100.0040.00416.73
8.0.90.0050.00316.90
8.0.80.0100.00616.95
8.0.70.0050.00316.77
8.0.60.0030.00516.93
8.0.50.0040.00416.72
8.0.30.0090.00917.17
8.0.20.0080.01017.40
8.0.10.0000.00716.92
8.0.00.0110.01316.64
7.4.330.0000.00715.09
7.4.320.0000.00616.60
7.4.300.0030.00316.61
7.4.290.0000.00716.50
7.4.280.0040.00416.53
7.4.270.0030.00316.54
7.4.260.0040.00416.59
7.4.250.0050.00316.51
7.4.240.0040.00416.48
7.4.230.0030.00316.40
7.4.220.0050.02116.56
7.4.210.0050.01316.51
7.4.200.0040.00416.48
7.4.190.0040.00416.48
7.4.160.0170.00316.36
7.4.150.0070.01017.40
7.4.140.0120.00617.86
7.4.130.0130.00716.50
7.4.120.0060.01316.55
7.4.110.0130.00616.46
7.4.100.0140.00316.41
7.4.90.0040.01316.53
7.4.80.0180.00516.28
7.4.70.0070.01016.52
7.4.60.0110.00616.48
7.4.50.0060.00316.41
7.4.40.0060.01222.77
7.4.30.0030.01316.52
7.4.00.0040.01115.17
7.3.330.0060.00013.27
7.3.320.0070.00013.16
7.3.310.0030.00316.11
7.3.300.0070.00016.16
7.3.290.0060.01316.29
7.3.280.0050.01216.32
7.3.270.0120.00417.40
7.3.260.0170.00716.22
7.3.250.0120.00516.40
7.3.240.0060.01216.59
7.3.230.0030.01416.39
7.3.210.0100.00716.60
7.3.200.0100.00719.39
7.3.190.0150.00916.33
7.3.180.0090.00916.45
7.3.170.0100.00616.61
7.3.160.0030.01316.37
7.3.120.0070.00714.81
7.2.330.0130.01016.57
7.2.320.0180.00516.75
7.2.310.0090.01216.62
7.2.300.0050.01216.55
7.2.290.0090.01216.84
7.2.00.0000.01319.53
7.1.100.0030.00618.20
7.1.70.0030.00717.24
7.1.60.0070.01819.82
7.1.50.0070.00716.89
7.1.00.0100.07022.48
7.0.200.0030.00316.98
7.0.140.0070.07321.97
7.0.60.0030.08019.93
7.0.50.0070.05317.84
7.0.40.0030.04320.41
7.0.30.0300.05720.36
7.0.20.0300.08020.05
7.0.10.0000.09320.09
7.0.00.0030.06720.08
5.6.210.0200.06320.74
5.6.200.0070.03718.16
5.6.190.0070.09020.42
5.6.180.0330.07020.58
5.6.170.0130.04320.45
5.6.160.0070.03720.54
5.6.150.0100.08018.29
5.6.140.0070.04718.18
5.6.130.0000.04318.18
5.6.120.0000.04320.99
5.6.110.0070.09020.99
5.6.100.0030.04020.89
5.6.90.0170.06020.96
5.6.80.0170.07020.53
5.5.350.0330.06720.42
5.5.340.0070.08018.02
5.5.330.0030.04320.57
5.5.320.0170.05020.38
5.5.310.0200.03320.33
5.5.300.0000.04018.08
5.5.290.0100.08017.96
5.5.280.0070.09020.78
5.5.270.0070.06020.63
5.5.260.0030.06720.85
5.5.250.0070.08320.67
5.5.240.0100.07020.26
5.4.450.0300.04319.39
5.4.440.0200.04019.41
5.4.430.0200.04019.48
5.4.420.0230.04319.47
5.4.410.0230.05019.33
5.4.400.0200.04019.09
5.4.390.0430.03318.98
5.4.380.0230.03718.95
5.4.370.0230.03718.98
5.4.360.0230.03719.07
5.4.350.0230.04719.09
5.4.340.0230.03719.09
5.4.320.0230.03718.96
5.4.310.0330.06019.13
5.4.300.0230.03719.05
5.4.290.0230.03719.05
5.4.280.0200.04019.24
5.4.270.0230.03718.99
5.4.260.0230.04019.14
5.4.250.0270.03318.86
5.4.240.0270.03318.98
5.4.230.0130.04718.84
5.4.220.0300.03719.19
5.4.210.0270.03319.31
5.4.200.0230.03719.07
5.4.190.0230.03719.15
5.4.180.0230.03719.18
5.4.170.0200.04318.80
5.4.160.0230.03718.83
5.4.150.0330.03018.85
5.4.140.0270.03316.46
5.4.130.0230.04316.49
5.4.120.0200.04016.45
5.4.110.0230.03316.51
5.4.100.0170.03716.58
5.4.90.0170.03716.51
5.4.80.0200.03716.25
5.4.70.0170.03716.52
5.4.60.0230.03016.25
5.4.50.0130.04016.48
5.4.40.0270.02716.54
5.4.30.0300.03016.53
5.4.20.0200.03716.51
5.4.10.0170.04016.51
5.4.00.0200.03315.79
5.3.290.0270.04714.59
5.3.280.0230.03714.60
5.3.270.0130.04714.77
5.3.260.0200.04314.61
5.3.250.0230.03714.79
5.3.240.0200.04014.52
5.3.230.0200.04014.65
5.3.220.0270.03714.65
5.3.210.0270.03314.62
5.3.200.0270.03314.54
5.3.190.0300.03014.56
5.3.180.0200.03714.54
5.3.170.0270.03314.79
5.3.160.0230.04714.57
5.3.150.0270.04314.66
5.3.140.0370.03714.54
5.3.130.0330.04314.54
5.3.120.0170.04314.78
5.3.110.0330.02714.46
5.3.100.0300.04713.96
5.3.90.0270.03714.01
5.3.80.0230.03714.07
5.3.70.0300.02713.93
5.3.60.0230.03714.09
5.3.50.0230.03713.93
5.3.40.0230.03714.05
5.3.30.0230.03313.82
5.3.20.0270.03713.92
5.3.10.0200.05013.59
5.3.00.0270.04013.71
5.2.170.0200.02711.31
5.2.160.0130.03711.16
5.2.150.0170.02711.08
5.2.140.0170.03011.23
5.2.130.0170.03311.23
5.2.120.0170.02711.27
5.2.110.0130.03711.23
5.2.100.0170.05311.12
5.2.90.0130.03011.27
5.2.80.0130.03011.15
5.2.70.0130.03011.01
5.2.60.0200.03311.29
5.2.50.0200.02311.06
5.2.40.0130.02710.90
5.2.30.0130.02710.88
5.2.20.0170.03010.93
5.2.10.0070.03310.83
5.2.00.0130.02710.63
5.1.60.0100.02710.09
5.1.50.0170.02010.15
5.1.40.0170.0279.91
5.1.30.0170.02010.39
5.1.20.0070.03010.43
5.1.10.0170.03010.05
5.1.00.0130.0279.99
5.0.50.0130.0179.76
5.0.40.0100.0179.76
5.0.30.0070.0339.76
5.0.20.0130.0439.76
5.0.10.0130.0209.76
5.0.00.0070.0309.76
4.4.90.0070.0179.76
4.4.80.0100.0239.76
4.4.70.0070.0209.76
4.4.60.0070.0209.76
4.4.50.0070.0179.76
4.4.40.0100.0339.76
4.4.30.0100.0139.76
4.4.20.0130.0109.76
4.4.10.0100.0139.76
4.4.00.0100.0209.76
4.3.110.0070.0179.76
4.3.100.0100.0139.76
4.3.90.0100.0209.76
4.3.80.0130.0209.76
4.3.70.0070.0179.76
4.3.60.0070.0139.76
4.3.50.0100.0139.76
4.3.40.0100.0409.76
4.3.30.0070.0239.76
4.3.20.0030.0179.76
4.3.10.0070.0139.76
4.3.00.0030.0179.76

preferences:
45.19 ms | 401 KiB | 5 Q