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 getY() { 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->getY()); var_dump($t->getY());

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.0030.01516.63
8.3.50.0070.00718.05
8.3.40.0150.00418.79
8.3.30.0110.00418.77
8.3.20.0080.00020.34
8.3.10.0040.00423.66
8.3.00.0060.00319.50
8.2.180.0040.01116.88
8.2.170.0040.01122.96
8.2.160.0130.00320.51
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0090.00017.50
8.2.120.0080.00026.35
8.2.110.0100.00019.27
8.2.100.0090.00317.78
8.2.90.0000.00918.16
8.2.80.0000.00917.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0050.00319.46
8.2.30.0040.00420.63
8.2.20.0040.00417.64
8.2.10.0040.00418.17
8.2.00.0030.00317.98
8.1.280.0120.00425.92
8.1.270.0060.00322.24
8.1.260.0050.00228.09
8.1.250.0040.00428.09
8.1.240.0090.00321.98
8.1.230.0040.00722.61
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0080.00017.22
8.1.180.0040.00418.10
8.1.170.0030.00618.61
8.1.160.0040.00422.12
8.1.150.0080.00018.85
8.1.140.0070.00319.62
8.1.130.0000.00717.62
8.1.120.0050.00217.44
8.1.110.0040.00417.36
8.1.100.0060.00317.46
8.1.90.0050.00217.41
8.1.80.0060.00317.36
8.1.70.0000.00717.37
8.1.60.0040.00417.63
8.1.50.0030.00517.41
8.1.40.0040.00417.50
8.1.30.0040.00417.62
8.1.20.0030.00517.57
8.1.10.0080.00017.49
8.1.00.0000.00717.38
8.0.300.0000.00719.95
8.0.290.0070.00016.63
8.0.280.0030.00318.42
8.0.270.0030.00517.25
8.0.260.0030.00317.14
8.0.250.0030.00317.06
8.0.240.0040.00417.08
8.0.230.0000.00716.88
8.0.220.0000.00716.94
8.0.210.0030.00316.89
8.0.200.0030.00316.89
8.0.190.0050.00317.00
8.0.180.0050.00317.00
8.0.170.0040.00416.85
8.0.160.0070.00016.99
8.0.150.0070.00016.86
8.0.140.0030.00516.73
8.0.130.0070.00313.41
8.0.120.0030.00516.80
8.0.110.0040.00416.80
8.0.100.0050.00316.98
8.0.90.0040.00416.95
8.0.80.0090.01016.99
8.0.70.0000.00816.99
8.0.60.0070.00016.98
8.0.50.0040.00416.88
8.0.30.0100.00917.00
8.0.20.0150.00917.40
8.0.10.0050.00317.14
8.0.00.0080.00916.84
7.4.330.0020.00216.76
7.4.320.0030.00316.60
7.4.300.0030.00316.59
7.4.290.0000.00816.65
7.4.280.0070.00016.47
7.4.270.0040.00416.45
7.4.260.0030.00316.62
7.4.250.0040.00416.52
7.4.240.0040.00416.58
7.4.230.0050.00216.39
7.4.220.0100.01316.52
7.4.210.0090.00616.56
7.4.200.0030.00316.68
7.4.160.0120.00616.66
7.4.150.0130.01017.40
7.4.140.0090.01417.86
7.4.130.0070.00916.44
7.4.120.0090.00816.53
7.4.110.0140.00616.54
7.4.100.0090.00916.45
7.4.90.0040.02016.45
7.4.80.0080.00819.39
7.4.70.0110.00716.57
7.4.60.0040.01216.52
7.4.50.0100.00716.40
7.4.40.0080.00816.64
7.4.30.0130.00316.73
7.4.00.0060.00914.66
7.3.330.0030.00313.20
7.3.320.0030.00313.44
7.3.310.0050.00216.25
7.3.300.0030.00316.30
7.3.290.0000.00616.38
7.3.280.0060.01316.42
7.3.270.0160.00017.40
7.3.260.0120.00416.54
7.3.250.0110.00616.37
7.3.240.0080.00916.39
7.3.230.0120.00616.44
7.3.210.0170.00716.32
7.3.200.0100.00516.42
7.3.190.0170.00316.33
7.3.180.0030.01316.42
7.3.170.0050.01416.37
7.3.160.0130.00316.46
7.2.330.0070.01616.34
7.2.320.0030.01516.41
7.2.310.0130.00316.46
7.2.300.0030.01316.41
7.2.290.0180.00316.67
7.2.60.0060.00916.70
7.2.00.0040.00819.16
7.1.200.0030.00915.47
7.1.100.0000.00918.23
7.1.70.0050.00317.10
7.1.60.0000.02219.48
7.1.50.0000.01016.64
7.1.00.0030.07722.30
7.0.200.6510.00714.50
7.0.60.0130.07719.93
7.0.50.0170.07017.91
7.0.40.0130.03320.11
7.0.30.0270.08020.21
7.0.20.0330.04720.30
7.0.10.0030.09320.21
7.0.00.0000.06020.07
5.6.280.0070.03321.04
5.6.210.0030.09020.75
5.6.200.0000.04318.18
5.6.190.0070.09020.60
5.6.180.0330.07720.46
5.6.170.0400.07720.55
5.6.160.0100.05020.71
5.6.150.0070.04318.28
5.6.140.0070.08318.16
5.6.130.0000.07318.21
5.6.120.0070.05021.06
5.6.110.0030.08721.13
5.6.100.0030.09021.09
5.6.90.0170.07321.02
5.6.80.0100.06720.27
5.5.350.2270.03320.42
5.5.340.0070.03717.94
5.5.330.0130.07720.47
5.5.320.0000.08320.34
5.5.310.0230.04320.24
5.5.300.0030.07017.95
5.5.290.0070.08017.94
5.5.280.0000.07020.88
5.5.270.0100.06320.80
5.5.260.0130.05320.66
5.5.250.0030.06720.60
5.5.240.0200.08020.29

preferences:
54.32 ms | 400 KiB | 5 Q