3v4l.org

run code in 300+ PHP versions simultaneously
<?php class LazyProperties { protected $foo; public function __construct() { unset($this->foo); } public function getFoo() { return $this->foo; } public function __get($property) { switch ($property) { case 'foo': echo __METHOD__."() is called\n"; return $this->foo = 'magic'; } } } $o = new LazyProperties(); var_dump($o->getFoo()); var_dump($o->getFoo()); var_dump($o->getFoo());

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.5.30.0120.00618.59
8.5.20.0050.00419.60
8.5.10.0110.00716.65
8.5.00.0130.00820.04
8.4.180.0160.00919.62
8.4.170.0110.01023.90
8.4.160.0030.00819.64
8.4.150.0020.00114.05
8.4.140.0130.00917.46
8.4.130.0090.01117.91
8.4.120.0050.00420.73
8.4.110.0110.00918.67
8.4.100.0120.01017.71
8.4.90.0060.00317.81
8.4.80.0110.00817.81
8.4.70.0120.00917.63
8.4.60.0160.00718.91
8.4.50.0100.00419.54
8.4.40.0030.00619.29
8.4.30.0070.01018.61
8.4.20.0160.00318.96
8.4.10.0060.00317.82
8.3.300.0130.00720.65
8.3.290.0110.00820.79
8.3.280.0130.00718.37
8.3.270.0120.00716.95
8.3.260.0110.00916.59
8.3.250.0100.00918.66
8.3.240.0100.01016.55
8.3.230.0110.00816.60
8.3.220.0080.01016.66
8.3.210.0130.00516.90
8.3.200.0050.00416.79
8.3.190.0090.00917.06
8.3.180.0120.00816.75
8.3.170.0000.00720.88
8.3.160.0120.00618.35
8.3.150.0050.00320.66
8.3.140.0060.00316.66
8.3.130.0160.00316.64
8.3.120.0040.00418.82
8.3.110.0090.00020.94
8.3.100.0160.00324.06
8.3.90.0040.00426.77
8.3.80.0030.00617.97
8.3.70.0150.00316.50
8.3.60.0040.01218.56
8.3.50.0030.01118.46
8.3.40.0140.00418.79
8.3.30.0000.01418.67
8.3.20.0080.00021.69
8.3.10.0040.00723.37
8.3.00.0080.00022.45
8.2.300.0140.00920.32
8.2.290.0040.00418.92
8.2.280.0090.00420.29
8.2.270.0120.00318.89
8.2.260.0060.00318.39
8.2.250.0080.00016.99
8.2.240.0130.00318.83
8.2.230.0060.00322.58
8.2.220.0030.00637.54
8.2.210.0110.00426.77
8.2.200.0030.00618.29
8.2.190.0180.00416.75
8.2.180.0090.00618.42
8.2.170.0150.00018.82
8.2.160.0070.00722.96
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00426.16
8.2.110.0040.00421.05
8.2.100.0040.00717.78
8.2.90.0040.00418.16
8.2.80.0060.00317.97
8.2.70.0000.00917.93
8.2.60.0040.00417.90
8.2.50.0040.00418.10
8.2.40.0020.00519.34
8.2.30.0000.00819.14
8.2.20.0040.00418.07
8.2.10.0040.00419.08
8.2.00.0040.00419.20
8.1.340.0150.00821.79
8.1.330.0090.00916.04
8.1.320.0030.00516.09
8.1.310.0070.00716.58
8.1.300.0110.00818.15
8.1.290.0000.00918.88
8.1.280.0150.00625.92
8.1.270.0050.00322.42
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00022.08
8.1.230.0040.00720.97
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0140.00017.25
8.1.190.0030.00817.25
8.1.180.0030.00618.10
8.1.170.0030.00618.65
8.1.160.0040.00418.86
8.1.150.0040.00418.99
8.1.140.0080.00020.87
8.1.130.0050.00220.13
8.1.120.0070.00017.34
8.1.110.0050.00317.47
8.1.100.0030.00617.35
8.1.90.0050.00517.45
8.1.80.0040.00417.44
8.1.70.0000.00717.37
8.1.60.0060.00317.54
8.1.50.0090.00317.57
8.1.40.0050.00317.55
8.1.30.0000.00817.58
8.1.20.0000.00817.51
8.1.10.0000.00817.60
8.1.00.0000.00817.59
8.0.300.0050.00219.97
8.0.290.0040.00416.63
8.0.280.0000.00718.38
8.0.270.0000.00816.80
8.0.260.0030.00620.08
8.0.250.0040.00416.80
8.0.240.0030.00316.95
8.0.230.0000.00716.88
8.0.220.0070.00016.71
8.0.210.0040.00416.81
8.0.200.0030.00316.91
8.0.190.0070.00016.89
8.0.180.0030.00516.91
8.0.170.0030.00616.94
8.0.160.0060.00316.80
8.0.150.0030.00616.74
8.0.140.0030.00316.77
8.0.130.0060.00013.21
8.0.120.0030.00616.85
8.0.110.0040.00416.71
8.0.100.0000.00716.71
8.0.90.0040.00416.76
8.0.80.0090.00616.89
8.0.70.0040.00416.74
8.0.60.0000.00716.79
8.0.50.0040.00416.73
8.0.30.0070.01117.15
8.0.20.0140.01117.11
8.0.10.0040.00416.99
8.0.00.0160.00316.94
7.4.330.0000.00515.55
7.4.320.0000.00616.53
7.4.300.0060.00016.64
7.4.290.0000.00716.59
7.4.280.0000.00816.62
7.4.270.0040.00416.61
7.4.260.0030.00313.30
7.4.250.0000.00716.49
7.4.240.0040.00316.54
7.4.230.0000.00716.71
7.4.220.0040.00316.39
7.4.210.0100.00716.53
7.4.200.0000.00716.72
7.4.140.0120.00817.86
7.4.130.0100.00716.38
7.4.120.0060.01316.59
7.4.110.0030.01316.55
7.4.100.0100.00716.46
7.4.90.0070.01016.57
7.4.80.0060.01019.39
7.4.70.0060.01116.57
7.4.60.0000.01616.59
7.4.50.0030.01216.46
7.4.40.0110.00616.62
7.4.00.0080.00615.03
7.3.330.0040.00416.42
7.3.320.0030.00313.32
7.3.310.0040.00416.27
7.3.300.0000.00716.36
7.3.290.0070.00016.32
7.3.280.0060.00916.24
7.3.260.0090.01016.46
7.3.240.0110.00916.43
7.3.230.0110.00616.30
7.3.210.0120.00616.38
7.3.200.0070.01116.46
7.3.190.0130.00616.40
7.3.180.0100.01016.61
7.3.170.0030.01316.45
7.3.160.0030.01316.65
7.3.90.0040.01114.86
7.3.80.0110.01115.02
7.3.70.0170.00614.88
7.3.60.0030.01214.86
7.3.50.0140.02814.48
7.3.40.0070.01114.86
7.3.30.0080.00614.85
7.3.20.0090.00914.61
7.3.10.0030.01314.84
7.3.00.0110.00814.97
7.2.330.0120.00616.40
7.2.320.0080.01216.75
7.2.310.0060.01116.83
7.2.300.0030.01416.80
7.2.290.0090.00616.56
7.2.220.0090.00614.79
7.2.210.0090.01314.60
7.2.200.0100.00714.79
7.2.190.0100.00915.07
7.2.180.0000.02015.18
7.2.170.0120.00615.18
7.2.160.0030.01214.96
7.2.150.0090.00614.95
7.2.140.0100.00715.01
7.2.130.0100.00715.13
7.2.120.0110.00615.17
7.2.110.0110.00615.20
7.2.100.0060.00915.13
7.2.90.0100.00615.28
7.2.80.0060.01115.00
7.2.70.0100.00715.27
7.2.60.0070.01015.40
7.2.50.0100.00715.28
7.2.40.0060.01015.11
7.2.30.0110.00814.95
7.2.20.0030.01314.95
7.2.10.0070.01015.09
7.2.00.0090.00915.11
7.1.320.0170.00013.75
7.1.310.0180.01213.87
7.1.300.0130.00313.89
7.1.290.0120.00914.05
7.1.280.0110.00913.93
7.1.270.0100.00713.91
7.1.260.0120.00313.70
7.1.250.0100.00613.73

preferences:
177.71 ms | 403 KiB | 5 Q