3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $x; private $y; public function __construct() { $this->x = 10; $this->y = function (){ return $this->getToutesLesCommandes();}; } public function __get($k) { return $this->$k; } public function getToutesLesCommandes() { //sleep(5); echo "Et 5 tres longues secondes plus tard..."; return array('commande1' => 123456, 'commande2' => 456789); } } $t = new Test(); //var_dump($t); var_dump($t->y); var_dump($t->y);

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.0060.01216.88
8.3.50.0190.00921.99
8.3.40.0070.01118.43
8.3.30.0140.01018.84
8.3.20.0040.00420.38
8.3.10.0070.00023.71
8.3.00.0080.00019.38
8.2.180.0140.00716.50
8.2.170.0070.00722.96
8.2.160.0040.01120.55
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.49
8.2.110.0060.00620.47
8.2.100.0040.00817.80
8.2.90.0080.00019.16
8.2.80.0060.00317.97
8.2.70.0050.00317.63
8.2.60.0030.00617.93
8.2.50.0050.00318.07
8.2.40.0030.00719.53
8.2.30.0000.00720.57
8.2.20.0040.00417.58
8.2.10.0040.00418.07
8.2.00.0040.00418.07
8.1.280.0110.00925.92
8.1.270.0040.00423.78
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00622.39
8.1.230.0070.00417.54
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0000.01017.35
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0050.00318.65
8.1.160.0030.00522.03
8.1.150.0070.00018.81
8.1.140.0040.00419.59
8.1.130.0070.00017.74
8.1.120.0000.00717.48
8.1.110.0000.00817.39
8.1.100.0000.00817.42
8.1.90.0040.00417.53
8.1.80.0020.00517.30
8.1.70.0070.00017.46
8.1.60.0030.00517.64
8.1.50.0000.00817.41
8.1.40.0040.00417.52
8.1.30.0000.00817.66
8.1.20.0000.00817.68
8.1.10.0040.00417.48
8.1.00.0050.00317.51
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0050.00318.38
8.0.270.0040.00417.20
8.0.260.0060.00017.30
8.0.250.0070.00016.96
8.0.240.0030.00316.89
8.0.230.0030.00516.84
8.0.220.0000.00716.93
8.0.210.0040.00416.82
8.0.200.0030.00316.97
8.0.190.0080.00416.90
8.0.180.0000.00716.80
8.0.170.0070.00016.93
8.0.160.0040.00416.92
8.0.150.0070.00016.78
8.0.140.0050.00316.85
8.0.130.0000.00613.37
8.0.120.0000.00816.91
8.0.110.0050.00316.80
8.0.100.0000.00716.89
8.0.90.0000.00716.96
8.0.80.0120.00916.95
8.0.70.0040.00416.82
8.0.60.0080.00016.96
8.0.50.0070.00016.76
8.0.30.0110.00717.03
8.0.20.0100.01117.40
8.0.10.0040.00416.88
8.0.00.0100.00716.80
7.4.330.0000.00515.08
7.4.320.0070.00016.59
7.4.300.0000.00616.52
7.4.290.0000.00816.58
7.4.280.0050.00516.61
7.4.270.0040.00416.41
7.4.260.0040.00416.46
7.4.250.0000.00716.56
7.4.240.0030.00416.49
7.4.230.0000.00716.61
7.4.220.0090.00916.39
7.4.210.0090.00616.47
7.4.200.0000.00716.58
7.4.160.0080.00816.66
7.4.150.0100.00717.40
7.4.140.0160.00417.86
7.4.130.0130.00616.55
7.4.120.0120.00516.61
7.4.110.0100.01016.51
7.4.100.0070.01016.57
7.4.90.0090.00916.45
7.4.80.0110.00619.39
7.4.70.0070.01016.34
7.4.60.0100.00716.46
7.4.50.0040.00416.48
7.4.40.0080.01316.55
7.4.30.0090.00816.40
7.4.00.0080.00614.99
7.3.330.0030.00313.18
7.3.320.0030.00313.26
7.3.310.0030.00316.31
7.3.300.0000.00616.31
7.3.290.0070.00916.33
7.3.280.0090.01016.32
7.3.270.0120.00917.40
7.3.260.0100.00716.28
7.3.250.0120.00716.39
7.3.240.0090.01316.29
7.3.230.0060.01216.52
7.3.210.0060.00916.49
7.3.200.0090.00816.23
7.3.190.0030.01416.40
7.3.180.0150.00316.38
7.3.170.0110.01416.72
7.3.160.0100.00916.57
7.3.120.0000.01714.58
7.3.110.0120.00315.11
7.3.100.0070.00714.73
7.3.90.0030.00914.79
7.3.80.0070.01014.73
7.3.70.0040.01414.98
7.3.60.0090.00614.94
7.3.50.0130.00014.62
7.3.40.0080.00814.68
7.3.30.0060.00914.82
7.3.20.0120.00316.73
7.3.10.0110.01016.31
7.3.00.0130.00616.39
7.2.330.0070.01116.38
7.2.320.0090.00916.43
7.2.310.0040.01516.28
7.2.300.0120.01016.51
7.2.290.0120.00616.59
7.2.250.0040.01115.27
7.2.240.0130.00715.24
7.2.230.0040.00815.21
7.2.220.0090.00614.89
7.2.210.0110.00715.09
7.2.200.0070.01014.96
7.2.190.0000.01314.68
7.2.180.0000.01515.07
7.2.170.0000.01414.93
7.2.130.0080.01616.78
7.2.120.0150.01216.32
7.2.110.0120.00615.98
7.2.100.0170.00716.04
7.2.90.0180.01116.32
7.2.80.0290.00616.12
7.2.70.0220.00316.25
7.2.60.0100.01416.12
7.2.50.0170.00616.67
7.2.40.0160.01116.41
7.2.30.0140.01416.44
7.2.20.0150.00416.57
7.2.10.0140.01016.34
7.2.00.0150.00617.87
7.1.330.0030.01015.56
7.1.320.0000.01615.80
7.1.310.0030.01315.80
7.1.300.0060.00615.61
7.1.290.0090.00015.54
7.1.280.0110.00015.83
7.1.270.0040.01015.75
7.1.260.0030.01215.65
7.1.250.0160.00615.00
7.1.100.0730.01516.26
7.1.70.0000.00717.23
7.1.60.0070.01719.48
7.1.50.0070.01616.87
7.1.00.0070.07322.54
7.0.200.0390.00714.75
7.0.70.0130.07020.00
7.0.60.0100.08320.08
7.0.50.0770.09020.34
7.0.40.0070.08320.09
7.0.30.0170.08020.11
7.0.20.0100.04720.04
7.0.10.0100.06020.14
7.0.00.0030.08020.09
5.6.280.0030.07321.00
5.6.220.0130.08320.63
5.6.210.0070.08320.61
5.6.200.0130.07021.05
5.6.190.0070.08021.05
5.6.180.0070.08720.95
5.6.170.0000.06721.14
5.6.160.0070.07721.02
5.6.150.0100.08021.09
5.6.140.0070.04021.05
5.6.130.0070.05020.96
5.6.120.0200.07721.09
5.6.110.0100.08721.08
5.6.100.0130.06021.11
5.6.90.0100.08021.02
5.6.80.0230.06020.57
5.6.70.0030.08320.39
5.6.60.0030.08320.43
5.6.50.0100.05320.43
5.6.40.0170.07720.42
5.6.30.0100.07720.38
5.6.20.0130.07720.39
5.6.10.0070.05320.38
5.6.00.0030.09020.29
5.5.360.0200.07020.37
5.5.350.0200.06320.46
5.5.340.0100.05320.88
5.5.330.0030.05320.94
5.5.320.0130.07720.77
5.5.310.0070.06720.66
5.5.300.0070.04320.88
5.5.290.0030.04320.82
5.5.280.0030.08720.84
5.5.270.0000.08720.64
5.5.260.0100.06320.88
5.5.250.0070.05320.68
5.5.240.0000.08320.27
5.5.230.0030.07020.27
5.5.220.0170.07020.29
5.5.210.0130.07320.22
5.5.200.0070.08020.19
5.5.190.0230.07320.25
5.5.180.0100.08320.01
5.5.160.0130.06720.20
5.5.150.0100.08320.25
5.5.140.0070.05320.22
5.5.130.0070.06320.23
5.5.120.0130.07320.22
5.5.110.0100.04720.09
5.5.100.0030.08320.09
5.5.90.0070.08019.94
5.5.80.0230.06020.08
5.5.70.0030.08320.16
5.5.60.0070.08320.07
5.5.50.0100.07320.07
5.5.40.0200.06720.07
5.5.30.0070.06719.97
5.5.20.0030.08720.16
5.5.10.0130.07719.95
5.5.00.0100.07719.98

preferences:
39.68 ms | 401 KiB | 5 Q