3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public readonly string $full; public function __construct( public readonly string $first, public readonly string $last, ) { unset($this->full); } public function __get(string $key) { print __FUNCTION__ . PHP_EOL; if ($key === 'full') { $this->full = "$this->first $this->last"; return $this->full; } } } $c = new C('Larry', 'Garfield'); print $c->first . PHP_EOL; print $c->full . PHP_EOL; print $c->full . PHP_EOL;

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.0050.00319.02
8.5.20.0170.00819.34
8.5.10.0060.00216.61
8.5.00.0030.00719.94
8.4.180.0130.00919.55
8.4.170.0120.00923.68
8.4.160.0110.01023.97
8.4.150.0070.00516.91
8.4.140.0180.00717.70
8.4.130.0060.00317.86
8.4.120.0100.00620.84
8.4.110.0100.00122.46
8.4.100.0160.00717.99
8.4.90.0130.00818.52
8.4.80.0080.00317.87
8.4.70.0050.00319.55
8.4.60.0120.00818.97
8.4.50.0120.00817.64
8.4.40.0090.00017.83
8.4.30.0030.00720.50
8.4.20.0090.00019.54
8.4.10.0030.00619.49
8.3.300.0120.00920.76
8.3.290.0130.00718.31
8.3.280.0130.00818.47
8.3.270.0110.01316.86
8.3.260.0120.00816.53
8.3.250.0100.00818.93
8.3.240.0120.00716.77
8.3.230.0130.00716.71
8.3.220.0070.00117.35
8.3.210.0090.00720.99
8.3.200.0060.00316.63
8.3.190.0110.00717.30
8.3.180.0110.00816.73
8.3.170.0130.00616.38
8.3.160.0110.00716.50
8.3.150.0120.00619.14
8.3.140.0030.01516.77
8.3.130.0090.00618.27
8.3.120.0060.00318.38
8.3.110.0040.00716.45
8.3.50.0000.00916.58
8.2.300.0120.00818.04
8.2.290.0110.00720.80
8.2.280.0130.00418.11
8.2.270.0090.00016.50
8.2.260.0040.00419.02
8.2.250.0040.00418.28
8.2.240.0080.00018.36
8.2.230.0080.00016.53
8.1.340.0110.00819.91
8.1.330.0120.00723.69
8.1.320.0110.00816.13
8.1.310.0050.00316.65
8.1.300.0040.00416.05
8.0.120.0060.00313.38
8.0.110.0080.00313.37
8.0.100.0090.00213.34
8.0.90.0060.00713.40
8.0.80.0070.00413.37
8.0.70.0090.00313.31
8.0.60.0060.00513.38
8.0.50.0080.00213.36
8.0.30.0060.00413.41
8.0.20.0040.00513.46
8.0.10.0070.00313.40
8.0.00.0020.00413.44
7.4.250.0110.00213.18
7.4.240.0120.00113.22
7.4.230.0100.00313.14
7.4.220.0070.00413.20
7.4.210.0040.00713.20
7.4.200.0090.00413.15
7.4.190.0070.00513.22
7.4.180.0070.00413.24
7.4.160.0090.00313.21
7.4.150.0070.00513.26
7.4.140.0100.00113.08
7.4.130.0080.00413.07
7.4.120.0060.00713.10
7.4.110.0090.00313.00
7.4.100.0050.00613.13
7.4.90.0070.00413.08
7.4.80.0060.00612.98
7.4.70.0020.00913.04
7.4.60.0100.00112.99
7.4.50.0100.00113.01
7.4.40.0070.00312.93
7.4.30.0040.00513.05
7.4.20.0050.00313.10
7.4.10.0070.00313.07
7.4.00.0070.00213.08
7.3.320.0110.00113.07
7.3.310.0090.00313.11
7.3.300.0070.00312.99
7.3.290.0040.00513.09
7.3.280.0040.00513.06
7.3.270.0070.00313.05
7.3.260.0080.00313.06
7.3.250.0060.00513.21
7.3.240.0070.00313.02
7.3.230.0090.00213.01
7.3.220.0060.00413.09
7.3.210.0050.00613.06
7.3.200.0090.00312.87
7.3.190.0080.00213.06
7.3.180.0070.00213.02
7.3.170.0050.00412.88
7.3.160.0060.00312.97
7.3.150.0080.00112.87
7.3.140.0080.00112.87
7.3.130.0070.00213.02
7.3.120.0040.00512.93
7.3.110.0080.00112.89
7.3.100.0040.00512.81
7.3.90.0060.00313.27
7.3.80.0070.00313.01
7.3.70.0040.00313.07
7.3.60.0040.00213.02
7.3.50.0030.00312.92
7.3.40.0040.00313.09
7.3.30.0050.00113.00
7.3.20.0050.00414.94
7.3.10.0070.00414.96
7.3.00.0070.00614.90

preferences:
67.89 ms | 1030 KiB | 5 Q