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($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->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.0110.00716.75
8.3.50.0130.00618.42
8.3.40.0060.01319.00
8.3.30.0040.01118.81
8.3.20.0040.00420.16
8.3.10.0030.00523.48
8.3.00.0090.00019.38
8.2.180.0150.00316.75
8.2.170.0070.01022.96
8.2.160.0030.01020.35
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0040.00417.63
8.2.120.0050.00326.35
8.2.110.0030.00620.47
8.2.100.0080.00417.72
8.2.90.0000.00818.16
8.2.80.0080.00017.97
8.2.70.0000.00817.61
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0000.00719.45
8.2.30.0040.00420.63
8.2.20.0040.00417.73
8.2.10.0040.00417.93
8.2.00.0040.00417.96
8.1.280.0100.00625.92
8.1.270.0030.00622.07
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0030.00722.13
8.1.230.0090.00321.03
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0070.00217.13
8.1.190.0000.00817.35
8.1.180.0000.00918.10
8.1.170.0030.00618.52
8.1.160.0050.00222.00
8.1.150.0070.00018.93
8.1.140.0060.00319.48
8.1.130.0000.00717.70
8.1.120.0000.00817.49
8.1.110.0090.00017.45
8.1.100.0040.00417.36
8.1.90.0040.00417.46
8.1.80.0030.00617.34
8.1.70.0030.00317.38
8.1.60.0050.00317.54
8.1.50.0090.00017.48
8.1.40.0000.00817.52
8.1.30.0040.00417.56
8.1.20.0040.00417.59
8.1.10.0000.00817.61
8.1.00.0000.00717.56
8.0.300.0040.00420.23
8.0.290.0040.00416.63
8.0.280.0040.00418.29
8.0.270.0050.00317.25
8.0.260.0030.00317.09
8.0.250.0070.00016.96
8.0.240.0040.00416.95
8.0.230.0070.00016.99
8.0.220.0000.00716.92
8.0.210.0040.00416.76
8.0.200.0050.00316.99
8.0.190.0040.00417.07
8.0.180.0030.00516.99
8.0.170.0000.00916.97
8.0.160.0000.00717.01
8.0.150.0070.00016.80
8.0.140.0040.00416.90
8.0.130.0030.00313.37
8.0.120.0040.00416.93
8.0.110.0000.00816.83
8.0.100.0040.00416.89
8.0.90.0040.00416.85
8.0.80.0000.02116.93
8.0.70.0070.00016.83
8.0.60.0000.00716.81
8.0.50.0080.00016.75
8.0.30.0080.01116.86
8.0.20.0090.01517.40
8.0.10.0000.00717.18
8.0.00.0090.00816.78
7.4.330.0000.00516.77
7.4.320.0000.00616.50
7.4.300.0030.00316.64
7.4.290.0070.00016.51
7.4.280.0040.00416.62
7.4.270.0070.00016.65
7.4.260.0030.00516.57
7.4.250.0040.00416.44
7.4.240.0030.00516.56
7.4.230.0030.00316.39
7.4.220.0030.01416.43
7.4.210.0080.01016.65
7.4.200.0030.00316.49
7.4.160.0070.01016.49
7.4.150.0120.00917.40
7.4.140.0100.00817.86
7.4.130.0090.01516.50
7.4.120.0090.00716.53
7.4.110.0060.01116.38
7.4.100.0060.01316.52
7.4.90.0110.00716.49
7.4.80.0100.01019.39
7.4.70.0090.00616.52
7.4.60.0070.01016.41
7.4.50.0090.00616.48
7.4.40.0120.00316.31
7.4.30.0030.01416.73
7.4.00.0080.00915.08
7.3.330.0020.00213.36
7.3.320.0030.00213.31
7.3.310.0050.00316.40
7.3.300.0000.00716.21
7.3.290.0070.00016.27
7.3.280.0100.00716.32
7.3.270.0130.00317.40
7.3.260.0120.00416.34
7.3.240.0120.01016.30
7.3.230.0060.01116.39
7.3.210.0100.01316.49
7.3.200.0030.01316.52
7.3.190.0030.02016.34
7.3.180.0100.01016.53
7.3.170.0120.00616.59
7.3.160.0100.00716.44
7.3.120.0110.00714.86
7.3.110.0130.00714.65
7.3.100.0060.00915.02
7.3.90.0090.00614.66
7.3.80.0160.00314.71
7.3.70.0030.01614.83
7.3.60.0000.01314.71
7.3.50.0070.00715.03
7.3.40.0060.00614.85
7.3.30.0000.00814.79
7.3.20.0060.00916.67
7.3.10.0090.00616.82
7.3.00.0040.00816.50
7.2.330.0030.01516.75
7.2.320.0090.01216.76
7.2.310.0080.00816.47
7.2.300.0060.01316.59
7.2.290.0070.01116.50
7.2.250.0030.01014.84
7.2.240.0040.01514.55
7.2.230.0030.01015.05
7.2.220.0040.01115.19
7.2.210.0070.01014.94
7.2.200.0070.00714.98
7.2.190.0070.00715.13
7.2.180.0000.01415.09
7.2.170.0030.00715.11
7.2.160.0030.01015.02
7.2.150.0030.01116.94
7.2.140.0030.00716.78
7.2.130.0070.00716.75
7.2.120.0030.01216.89
7.2.110.0140.00016.52
7.2.100.0080.00716.94
7.2.90.0000.01416.70
7.2.80.0060.01017.07
7.2.70.0110.00316.88
7.2.60.0060.00716.77
7.2.50.0090.00616.94
7.2.40.0080.00816.82
7.2.30.0060.00316.79
7.2.20.0070.01117.00
7.2.10.0120.00616.99
7.2.00.0060.00518.05
7.1.330.0070.01115.59
7.1.320.0000.01515.67
7.1.310.0100.00715.77
7.1.300.0000.00915.71
7.1.290.0120.00315.65
7.1.280.0090.00015.80
7.1.270.0070.00715.71
7.1.260.0000.01015.70
7.1.250.0040.00815.70
7.1.240.0060.00615.93
7.1.230.0070.00715.70
7.1.220.0000.01515.61
7.1.210.0090.00615.67
7.1.200.0070.00315.75
7.1.190.0000.01315.82
7.1.180.0040.01115.67
7.1.170.0060.00615.57
7.1.160.0040.00915.41
7.1.150.0040.00815.72
7.1.140.0070.00715.69
7.1.130.0000.01215.69
7.1.120.0070.00715.66
7.1.110.0030.01015.84
7.1.100.0050.00716.82
7.1.90.0030.01015.67
7.1.80.0080.00415.59
7.1.70.0060.00416.41
7.1.60.0080.00917.58
7.1.50.0070.00716.34
7.1.40.0030.01415.66
7.1.30.0030.01015.59
7.1.20.0070.01015.68
7.1.10.0050.00515.56
7.1.00.0060.04119.06
7.0.330.0060.00915.36
7.0.320.0030.00615.43
7.0.310.0030.01015.54
7.0.300.0070.00715.27
7.0.290.0060.00315.39
7.0.280.0030.01015.16
7.0.270.0040.00715.46
7.0.260.0000.01315.18
7.0.250.0030.00515.26
7.0.240.0080.00615.15
7.0.230.0030.01315.29
7.0.220.0090.00015.48
7.0.210.0060.00615.12
7.0.200.0370.00415.04
7.0.190.0060.00615.46
7.0.180.0040.00715.46
7.0.170.0040.01115.50
7.0.160.0110.00415.47
7.0.150.0070.00715.39
7.0.140.0110.00015.48
7.0.130.0070.00715.14
7.0.120.0100.00615.43
7.0.110.0070.00715.59
7.0.100.0030.01015.49
7.0.90.0100.00715.21
7.0.80.0110.00415.48
7.0.70.0070.00715.38
7.0.60.0060.02417.78
7.0.50.0100.04416.62
7.0.40.0070.02516.75
7.0.30.0180.04016.93
7.0.20.0200.03816.89
7.0.10.0080.03416.88
7.0.00.0050.04616.75
5.6.400.0080.00814.41
5.6.390.0000.01514.35
5.6.380.0060.00314.18
5.6.370.0100.00014.55
5.6.360.0030.01114.38
5.6.350.0110.00014.17
5.6.340.0030.01314.25
5.6.330.0070.00714.31
5.6.320.0070.00714.32
5.6.310.0080.00614.20
5.6.300.0050.00314.23
5.6.290.0090.00614.34
5.6.280.0060.02117.75
5.6.270.0090.00614.55
5.6.260.0030.00714.41
5.6.250.0090.00614.72
5.6.240.0080.01114.59
5.6.230.0070.01014.65
5.6.220.0090.00314.48
5.6.210.0030.04017.54
5.6.200.0070.02816.20
5.6.190.0110.04217.54
5.6.180.0170.02517.45
5.6.170.0180.04517.30
5.6.160.0040.04117.42
5.6.150.0050.04116.33
5.6.140.0030.04716.21
5.6.130.0080.02816.35
5.6.120.0100.04317.87
5.6.110.0050.04017.62
5.6.100.0100.04217.70
5.6.90.0080.03717.64
5.6.80.0120.03217.37
5.6.70.0110.00414.09
5.6.60.0000.00814.29
5.6.50.0030.01014.13
5.6.40.0110.00414.09
5.6.30.0060.00614.20
5.6.20.0070.00314.20
5.6.10.0120.00014.47
5.6.00.0040.01214.26
5.5.380.0090.00014.02
5.5.370.0090.00614.03
5.5.360.0030.00614.45
5.5.350.1550.02317.33
5.5.340.0020.02816.11
5.5.330.0030.04417.23
5.5.320.0080.04017.45
5.5.310.0130.03117.43
5.5.300.0030.02516.07
5.5.290.0110.01816.01
5.5.280.0030.04517.52
5.5.270.0090.04117.43
5.5.260.0040.03117.52
5.5.250.0100.03917.21
5.5.240.0150.04116.91
5.5.230.0030.00714.23
5.5.220.0080.00314.32
5.5.210.0040.01214.14
5.5.200.0100.00314.24
5.5.190.0100.00314.04
5.5.180.0080.00014.28
5.5.170.0000.01214.31
5.5.160.0070.00714.21
5.5.150.0030.01214.14
5.5.140.0040.01114.25
5.5.130.0070.00414.05
5.5.120.0090.00314.27
5.5.110.0030.00714.18
5.5.100.0100.00314.02
5.5.90.0060.01014.23
5.5.80.0030.00913.95
5.5.70.0000.01014.16
5.5.60.0000.01414.00
5.5.50.0040.01114.23
5.5.40.0070.01114.29
5.5.30.0080.00514.45
5.5.20.0070.01013.94
5.5.10.0030.01514.24
5.5.00.0000.01414.09

preferences:
63.87 ms | 401 KiB | 5 Q