3v4l.org

run code in 500+ PHP versions simultaneously
<?php class User { public string $first_name; public string $last_name; /** * this is going to be a lazy property, uninitialized by default, perhaps writting like: * * lazy public string $full_name; */ public string $full_name; function __construct() { // this is what the "lazy" type would do in the background.. keep the public property uninitialized until set otherwise handled by __get/__set unset($this->full_name); } function __get($key) { if ($key === 'full_name') { return $this->first_name.' '.$this->last_name; } } } $user = new User(); $user->first_name = 'John'; $user->last_name = 'Wick'; echo $user->full_name;

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.01219.46
8.5.20.0100.01020.21
8.5.10.0080.00919.53
8.5.00.0130.00819.79
8.4.180.0120.00919.65
8.4.170.0090.01123.79
8.4.160.0110.00923.73
8.4.150.0080.00416.86
8.4.140.0120.00917.68
8.4.130.0060.00317.69
8.4.120.0110.01120.80
8.4.110.0080.00318.84
8.4.100.0110.01019.01
8.4.90.0160.00420.76
8.4.80.0030.00818.96
8.4.70.0100.01118.90
8.4.60.0100.01018.63
8.4.50.0060.00320.46
8.4.40.0180.00317.61
8.4.30.0060.01320.34
8.4.20.0030.00622.37
8.4.10.0110.00022.09
8.3.300.0100.01118.54
8.3.290.0060.01420.96
8.3.280.0080.00316.20
8.3.270.0100.00916.82
8.3.260.0080.01116.52
8.3.250.0150.00417.11
8.3.240.0130.00616.69
8.3.230.0120.00716.64
8.3.220.0040.00419.04
8.3.210.0110.00816.67
8.3.200.0050.00716.81
8.3.190.0050.00316.98
8.3.180.0090.00818.81
8.3.170.0040.01416.80
8.3.160.0070.01017.34
8.3.150.0140.00017.16
8.3.140.0070.00018.78
8.3.130.0040.00418.26
8.3.120.0100.01018.59
8.3.110.0040.00416.63
8.3.100.0130.00318.71
8.3.90.0040.00416.50
8.3.80.0030.00618.56
8.3.70.0160.00316.75
8.3.60.0110.00718.31
8.3.50.0120.00616.81
8.3.40.0100.00721.95
8.3.30.0130.00320.20
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0040.00426.16
8.2.300.0110.00822.34
8.2.290.0100.00820.81
8.2.280.0110.00820.46
8.2.270.0030.01416.57
8.2.260.0120.00316.55
8.2.250.0040.00416.61
8.2.240.0060.00316.96
8.2.230.0060.00320.94
8.2.220.0080.00024.06
8.2.210.0070.00726.77
8.2.200.0080.00416.50
8.2.190.0090.00616.63
8.2.180.0070.00716.63
8.2.170.0140.00718.81
8.2.160.0070.00722.96
8.2.150.0020.00525.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00819.72
8.2.110.0070.00322.29
8.2.100.0050.00520.32
8.2.70.0110.00317.31
8.1.340.0110.00917.73
8.1.330.0110.00818.13
8.1.320.0100.01116.05
8.1.310.0090.00916.24
8.1.300.0090.00018.38
8.1.290.0090.00018.88
8.1.280.0000.01425.92
8.1.270.0080.00024.66
8.1.260.0000.00726.35
8.1.250.0020.00528.09
8.1.240.0060.00618.63
8.1.230.0060.00318.42

preferences:
79.59 ms | 845 KiB | 5 Q