3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { private $username; protected $password; function __construct(){ $this->username = 'test'; } public function login() { return 'login'; } public function register() { return 'register'; } } class Teacher extends User { public $id; public $name; public $description; public $email; public $phone; function __construct(){ parent::__construct(); } public function getUsername() { return $this->username; } public function getPassword() { return $this->password; } } $o = new Teacher(); var_dump($o->getUsername());

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.0110.00619.24
8.5.20.0110.00719.59
8.5.10.0100.00721.46
8.5.00.0140.00720.03
8.4.180.0130.01119.76
8.4.170.0120.01123.93
8.4.160.0150.00823.93
8.4.150.0070.00516.94
8.4.140.0110.01117.80
8.4.130.0110.01018.00
8.4.120.0080.01224.08
8.4.110.0100.00918.91
8.4.100.0130.00717.61
8.4.90.0100.01117.66
8.4.80.0100.00817.89
8.4.70.0110.00917.64
8.4.60.0150.00717.93
8.4.50.0130.00818.77
8.4.40.0100.01019.30
8.4.30.0040.01520.58
8.4.20.0160.00320.55
8.4.10.0060.00319.39
8.3.300.0100.01022.59
8.3.290.0120.00920.76
8.3.280.0130.00919.88
8.3.270.0130.00716.43
8.3.260.0120.00816.61
8.3.250.0110.00919.16
8.3.240.0110.00516.88
8.3.230.0080.01116.54
8.3.220.0060.00317.23
8.3.210.0050.00316.79
8.3.200.0090.01018.76
8.3.190.0090.01016.93
8.3.180.0070.00316.70
8.3.170.0070.01118.89
8.3.160.0060.00618.06
8.3.150.0090.00917.33
8.3.140.0080.00016.72
8.3.130.0120.00618.73
8.3.120.0100.01020.68
8.3.110.0030.00517.04
8.3.100.0040.00416.50
8.3.90.0080.00016.68
8.3.80.0030.00618.43
8.3.70.0070.01118.56
8.3.60.0100.00618.55
8.3.50.0100.00318.51
8.3.40.0040.01118.71
8.3.30.0060.00918.89
8.3.20.0090.00621.85
8.3.10.0070.00021.79
8.3.00.0040.00420.78
8.2.300.0140.01418.20
8.2.290.0100.00920.43
8.2.280.0090.01016.82
8.2.270.0120.00619.17
8.2.260.0050.00216.95
8.2.250.0040.00416.83
8.2.240.0030.00717.41
8.2.230.0100.00720.94
8.2.220.0000.00937.54
8.2.210.0050.00326.77
8.2.200.0040.00416.88
8.2.190.0150.00016.75
8.2.180.0070.00718.40
8.2.170.0180.00022.96
8.2.160.0070.00721.11
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0040.00426.16
8.2.110.0060.00322.22
8.2.100.0040.00717.91
8.2.90.0050.00319.45
8.2.80.0040.00418.04
8.2.70.0060.00317.91
8.2.60.0050.00318.22
8.2.50.0030.00518.10
8.2.40.0080.00019.16
8.2.30.0040.00419.14
8.2.20.0040.00418.00
8.2.10.0000.00818.88
8.2.00.0030.00619.08
8.1.340.0120.00819.60
8.1.330.0130.00616.67
8.1.320.0110.00716.07
8.1.310.0040.01118.66
8.1.300.0080.00020.03
8.1.290.0030.00618.88
8.1.280.0040.01225.92
8.1.270.0030.00520.31
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0060.00322.23
8.1.230.0070.00420.97
8.1.220.0060.00320.96
8.1.210.0000.00918.77
8.1.200.0030.00617.35
8.1.190.0050.00517.22
8.1.180.0040.00418.10
8.1.170.0040.00418.73
8.1.160.0070.00318.95
8.1.150.0000.00718.80
8.1.140.0070.00018.75
8.1.130.0000.00720.02
8.1.120.0050.00317.37
8.1.110.0030.00617.45
8.1.100.0040.00417.41
8.1.90.0070.00317.30
8.1.80.0020.00517.41
8.1.70.0000.00717.36
8.1.60.0060.00317.59
8.1.50.0040.00417.41
8.1.40.0000.00817.54
8.1.30.0040.00417.64
8.1.20.0000.00817.64
8.1.10.0040.00417.52
8.1.00.0000.00717.36
8.0.300.0000.00821.57
8.0.290.0080.00016.63
8.0.280.0030.00318.31
8.0.270.0080.00017.28
8.0.260.0030.00520.03
8.0.250.0000.00616.86
8.0.240.0060.00316.88
8.0.230.0000.00816.84
8.0.220.0050.00316.91
8.0.210.0030.00316.77
8.0.200.0110.00016.84
8.0.190.0000.00717.02
8.0.180.0000.00816.83
8.0.170.0040.00516.90
8.0.160.0020.00516.88
8.0.150.0040.00416.86
8.0.140.0050.00316.91
8.0.130.0030.00313.32
8.0.120.0040.00416.87
8.0.110.0040.00416.73
8.0.100.0050.00317.02
8.0.90.0000.00816.82
8.0.80.0080.00816.90
8.0.70.0040.00416.90
8.0.60.0050.00216.91
8.0.50.0040.00416.95
8.0.30.0110.01116.99
8.0.20.0130.00617.06
8.0.10.0020.00516.86
8.0.00.0100.00716.49
7.4.330.0000.00415.55
7.4.320.0000.00616.54
7.4.300.0000.00616.44
7.4.290.0030.00316.66
7.4.280.0040.00416.61
7.4.270.0030.00316.45
7.4.260.0030.00313.31
7.4.250.0000.00716.64
7.4.240.0060.00216.64
7.4.230.0030.00316.51
7.4.220.0070.00016.69
7.4.210.0080.01016.51
7.4.200.0000.00816.69
7.4.130.0070.01016.45
7.4.120.0090.00916.54
7.4.110.0070.01316.76
7.4.100.0090.01016.36
7.4.90.0140.00716.69
7.4.80.0070.01019.39
7.4.70.0160.00316.62
7.4.60.0030.01416.18
7.4.50.0040.01216.30
7.4.40.0060.01516.56
7.4.00.0090.00615.08
7.3.330.0030.00716.31
7.3.320.0030.00313.37
7.3.310.0000.00716.27
7.3.300.0030.00316.38
7.3.290.0070.00016.29
7.3.280.0100.01016.39
7.3.260.0070.01116.38
7.3.240.0100.01016.46
7.3.230.0060.01116.32
7.3.210.0030.01416.50
7.3.200.0090.01216.37
7.3.190.0060.00916.58
7.3.180.0130.01016.34
7.3.170.0110.00616.34
7.3.160.0040.01216.56
7.3.110.0100.00714.57
7.3.100.0070.00514.92
7.3.90.0110.00214.79
7.3.80.0050.01014.64
7.3.70.0070.00914.77
7.3.60.0090.00614.60
7.3.50.0040.00914.95
7.3.40.0080.00514.66
7.3.30.0030.01014.43
7.3.20.0050.00814.67
7.3.10.0020.01114.62
7.3.00.0080.00814.96
7.2.330.0070.01016.75
7.2.320.0130.00916.46
7.2.310.0120.00316.57
7.2.300.0100.01016.59
7.2.290.0120.00916.69
7.2.240.0090.00514.81
7.2.230.0050.00914.97
7.2.220.0080.00514.83
7.2.210.0030.01214.75
7.2.200.0050.00915.06
7.2.190.0100.00514.76
7.2.180.0060.00714.91
7.2.170.0030.01214.86
7.2.160.0100.00514.65
7.2.150.0090.00515.17
7.2.140.0080.00614.84
7.2.130.0040.01315.01
7.2.120.0180.00615.02
7.2.110.0080.00915.06
7.2.100.0100.00715.05
7.2.90.0120.00615.02
7.2.80.0040.01014.98
7.2.70.0100.00515.23
7.2.60.0090.00615.03
7.2.50.0100.00514.98
7.2.40.0090.00514.96
7.2.30.0110.00314.87
7.2.20.0050.00914.90
7.2.10.0070.00815.07
7.2.00.0020.01214.85
7.1.330.0080.00813.88
7.1.320.0040.00913.70
7.1.310.0030.01013.96
7.1.300.0030.01013.81
7.1.290.0060.00613.82
7.1.280.0080.00713.74
7.1.270.0070.00613.76
7.1.260.0050.00813.87
7.1.250.0110.00513.80

preferences:
108.2 ms | 1496 KiB | 5 Q