3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <head> <title>Reconstructing the Person Class</title> <link type='text/css' rel='stylesheet' href='style.css'/> </head> <body> <p> <!-- Your code here --> <?php class Person{ public $isAlive = true; public $firstname; public $lastname; public $age; public function __contruct($firstname, $lastname, $age){ $this -> firstname = $firstname; $this -> lastname = $lastname; $this -> age = $age; } } $teacher = new Person("boring", "12345", 12345); $student = new Person("Brett", "Thomas", 27); echo $student -> age; ?> </p> </body> </html>

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.0100.01018.39
8.3.50.0140.00522.05
8.3.40.0120.00318.70
8.3.30.0100.01018.96
8.3.20.0030.00520.16
8.3.10.0040.00421.73
8.3.00.0080.00019.25
8.2.180.0140.00418.18
8.2.170.0110.00422.96
8.2.160.0140.00719.46
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00419.25
8.2.110.0070.00422.06
8.2.100.0040.00817.75
8.2.90.0080.00018.99
8.2.80.0030.00517.97
8.2.70.0040.00417.50
8.2.60.0040.00518.05
8.2.50.0080.00018.07
8.2.40.0040.00419.82
8.2.30.0050.00218.16
8.2.20.0000.00817.71
8.2.10.0040.00417.96
8.2.00.0040.00419.39
8.1.280.0200.00025.92
8.1.270.0040.00818.86
8.1.260.0140.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.92
8.1.230.0070.00419.05
8.1.220.0000.00917.79
8.1.210.0060.00318.77
8.1.200.0080.00017.23
8.1.190.0040.00417.10
8.1.180.0030.00618.10
8.1.170.0060.00320.30
8.1.160.0040.00422.00
8.1.150.0030.00618.89
8.1.140.0000.00717.47
8.1.130.0080.00017.91
8.1.120.0050.00517.39
8.1.110.0080.00017.46
8.1.100.0000.00717.32
8.1.90.0040.00417.36
8.1.80.0000.00717.32
8.1.70.0030.00317.45
8.1.60.0030.00617.43
8.1.50.0040.00417.38
8.1.40.0000.00717.52
8.1.30.0040.00417.64
8.1.20.0030.00617.59
8.1.10.0000.00717.53
8.1.00.0040.00417.41
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0030.00318.38
8.0.270.0030.00517.25
8.0.260.0070.00017.29
8.0.250.0030.00317.00
8.0.240.0050.00216.88
8.0.230.0030.00316.93
8.0.220.0070.00016.79
8.0.210.0040.00416.87
8.0.200.0070.00316.93
8.0.190.0040.00416.94
8.0.180.0040.00416.79
8.0.170.0080.00016.85
8.0.160.0000.00716.87
8.0.150.0000.00716.70
8.0.140.0040.00416.80
8.0.130.0050.00013.21
8.0.120.0050.00316.83
8.0.110.0070.00016.87
8.0.100.0060.00316.68
8.0.90.0050.00216.83
8.0.80.0030.01316.83
8.0.70.0040.00416.80
8.0.60.0000.00716.82
8.0.50.0000.00716.84
8.0.30.0110.01216.94
8.0.20.0130.01017.40
8.0.10.0050.00317.01
8.0.00.0070.01016.72
7.4.330.0030.00315.09
7.4.320.0040.00416.50
7.4.300.0060.00016.54
7.4.290.0040.00216.47
7.4.280.0000.00716.47
7.4.270.0030.00316.45
7.4.260.0040.00416.46
7.4.250.0000.00716.41
7.4.240.0080.00116.53
7.4.230.0000.00716.49
7.4.220.0030.01516.45
7.4.210.0120.00616.55
7.4.200.0030.00316.21
7.4.160.0160.00016.43
7.4.150.0170.00717.40
7.4.140.0170.00417.86
7.4.130.0080.00916.53
7.4.120.0080.01016.47
7.4.110.0090.01216.41
7.4.100.0100.00716.39
7.4.90.0110.00616.36
7.4.80.0030.01919.39
7.4.70.0000.01716.54
7.4.60.0030.01216.43
7.4.50.0000.00516.40
7.4.40.0030.01416.63
7.4.30.0110.00716.30
7.4.00.0150.00014.81
7.3.330.0000.00513.12
7.3.320.0090.00313.03
7.3.310.0000.00716.09
7.3.300.0070.00016.23
7.3.290.0060.00816.18
7.3.280.0080.01016.17
7.3.270.0090.00917.40
7.3.260.0110.00516.38
7.3.250.0110.00716.38
7.3.240.0090.00916.35
7.3.230.0150.00416.39
7.3.210.0070.01016.24
7.3.200.0120.00619.39
7.3.190.0100.00716.39
7.3.180.0060.00916.33
7.3.170.0030.01916.27
7.3.160.0040.01916.50
7.3.10.0060.00616.49
7.3.00.0050.00616.57
7.2.330.0160.00616.79
7.2.320.0090.01416.40
7.2.310.0060.01616.73
7.2.300.0110.01116.49
7.2.290.0120.01216.36
7.2.130.0050.01016.76
7.2.120.0030.01016.88
7.2.110.0020.00916.63
7.2.100.0040.01016.76
7.2.90.0080.00616.80
7.2.80.0030.01216.98
7.2.70.0020.01216.77
7.2.60.0050.00616.76
7.2.50.0030.01016.79
7.2.40.0080.00516.90
7.2.30.0050.01016.93
7.2.20.0080.00316.72
7.2.10.0070.00716.70
7.2.00.0030.00817.74
7.1.250.0030.00615.89
7.1.200.0030.00615.35
7.1.100.0040.00418.10
7.1.70.0070.00016.75
7.1.60.0100.01319.50
7.1.50.0090.01516.94
7.1.00.0030.07722.32
7.0.200.0230.00816.54
7.0.140.0130.05021.92
7.0.60.0030.05719.82
7.0.50.0030.04717.88
7.0.40.0100.08720.18
7.0.30.0370.07320.38
7.0.20.0200.08720.21
7.0.10.0170.04020.24
7.0.00.0070.07720.33
5.6.280.0000.07720.80
5.6.210.0130.06020.64
5.6.200.0070.06018.15
5.6.190.0070.05320.64
5.6.180.0230.08320.56
5.6.170.0230.07020.71
5.6.160.0130.07720.50
5.6.150.0070.04018.29
5.6.140.0070.06018.11
5.6.130.0100.03718.11
5.6.120.0100.07721.12
5.6.110.0030.06721.11
5.6.100.0100.04320.99
5.6.90.0000.05020.98
5.6.80.0030.05020.51
5.6.70.0370.07720.40
5.5.350.0100.08720.46
5.5.340.0000.04718.07
5.5.330.0030.05320.40
5.5.320.0200.06320.37
5.5.310.0230.04020.26
5.5.300.0070.06718.04
5.5.290.0030.04318.01
5.5.280.0030.04320.68
5.5.270.0070.07020.76
5.5.260.0170.07720.89
5.5.250.0070.08020.78
5.5.240.0100.07020.28
5.4.450.0700.05019.70
5.4.440.1170.07319.47
5.4.430.0100.05719.70
5.4.420.0870.05719.19
5.4.410.1130.06719.57
5.4.400.0130.06718.77
5.4.390.0130.06018.77
5.4.380.0330.04318.63
5.4.370.0200.05318.52
5.4.360.0170.05318.84
5.4.350.0100.07318.63
5.4.340.0130.08018.64
5.4.320.0330.06018.61
5.4.310.0130.07318.80
5.4.300.0170.07718.59
5.4.290.0130.07718.74
5.4.280.0230.05318.53
5.4.270.0200.05318.58
5.4.260.0200.05018.49
5.4.250.0130.06318.52
5.4.240.0270.05018.80
5.4.230.0230.05318.59
5.4.220.0100.06318.62
5.4.210.0200.05718.48
5.4.200.0200.05716.79
5.4.190.0270.06318.45
5.4.180.0330.05318.45
5.4.170.0230.06018.60
5.4.160.0170.05718.78
5.4.150.0200.05318.71
5.4.140.0370.05316.20
5.4.130.0270.06316.21
5.4.120.0270.06716.25
5.4.110.0200.06716.34
5.4.100.0270.05716.18
5.4.90.0270.06316.27
5.4.80.0200.06716.25
5.4.70.0300.06016.40
5.4.60.0170.05716.32
5.4.50.0270.04316.26
5.4.40.0200.07016.18
5.4.30.0230.05316.25
5.4.20.0330.05716.15
5.4.10.0200.05316.18
5.4.00.0270.05715.72
5.3.290.0200.05314.67
5.3.280.0100.06014.80
5.3.270.0170.07014.63
5.3.260.0300.06014.59
5.3.250.0170.06714.73
5.3.240.0270.04714.59
5.3.230.0200.05314.82
5.3.220.0200.05714.71
5.3.210.0200.06314.59
5.3.200.0230.07014.60
5.3.190.0200.07014.55
5.3.180.0130.07314.70
5.3.170.0270.05014.73
5.3.160.0200.07314.61
5.3.150.0300.06714.73
5.3.140.0130.06014.56
5.3.130.0300.05014.73
5.3.120.0200.05314.53
5.3.110.0300.07314.55
5.3.100.0200.07314.24
5.3.90.0270.05714.00
5.3.80.0330.04014.04
5.3.70.0170.05714.12
5.3.60.0200.05313.98
5.3.50.0200.05313.96
5.3.40.0300.06014.05
5.3.30.0170.06013.93
5.3.20.0270.04313.74
5.3.10.0100.06013.76
5.3.00.0230.04313.74
5.2.170.0130.04711.27
5.2.160.0200.03711.35
5.2.150.0130.04711.19
5.2.140.0230.03711.14
5.2.130.0200.03711.20
5.2.120.0170.05711.13
5.2.110.0300.04311.18
5.2.100.0270.04711.31
5.2.90.0200.04011.17
5.2.80.0200.04311.21
5.2.70.0130.04311.13
5.2.60.0200.03711.18
5.2.50.0100.04711.07
5.2.40.0130.04311.05
5.2.30.0070.05010.97
5.2.20.0170.03711.18
5.2.10.0170.04010.92
5.2.00.0100.04310.77
5.1.60.0200.03310.01
5.1.50.0200.02710.02
5.1.40.0070.0409.98
5.1.30.0100.04310.57
5.1.20.0100.04710.44
5.1.10.0130.04010.11
5.1.00.0070.04310.25
5.0.50.0070.0338.58
5.0.40.0100.0278.45
5.0.30.0070.0438.21
5.0.20.0100.0278.42
5.0.10.0070.0308.36
5.0.00.0030.0608.35
4.4.90.0130.0176.64
4.4.80.0070.0236.64
4.4.70.0200.0106.64
4.4.60.0070.0236.64
4.4.50.0070.0336.64
4.4.40.0070.0406.64
4.4.30.0130.0206.64
4.4.20.0030.0306.64
4.4.10.0100.0276.64
4.4.00.0070.0476.64
4.3.110.0070.0306.64
4.3.100.0100.0276.64
4.3.90.0030.0276.64
4.3.80.0070.0436.64
4.3.70.0030.0276.64
4.3.60.0070.0236.64
4.3.50.0030.0276.64
4.3.40.0030.0436.64
4.3.30.0030.0306.64
4.3.20.0070.0206.64
4.3.10.0030.0306.64
4.3.00.0100.0236.58

preferences:
54.49 ms | 401 KiB | 5 Q