3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Account { private $accNumber; private $bal; private $branch; private $accOwner; function __construct($accNumber,$bal,$branch,$accOwner) { $this->accNumber = $accNumber; $this->bal = $bal; $this->branch = $branch; $this->accOwner = $accOwner; $this->accOwner->setAccount($this); } } class SavingsAccount extends Account { private $type = "SavingsAccount"; public function getTypeOfAccount() { return $this->$type; } } class CurrentAccount extends Account { private $type = "CurrentAccount"; public function getTypeOfAccount() { return $this->$type; } } class AccountHolder { private $name; private $age; private $mob; private $account; function __construct($name,$age,$mob) { $this->full = $name; $this->age = $age; $this->mob = $mob; } public function setAccount($account) { $this->account = $account; } } $person_1 = new AccountHolder("Nevil",29,933338787); $account_1 = new CurrentAccount(111111,77896.00,"Kaloor",$person_1); $person_2 = new AccountHolder("Chitra",23,9878787345); $account_2 = new SavingsAccount(222222,18765.00,"Edapally",$person_2); print_r($account_1); print_r($account_2); ?>

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.70.0120.00616.63
8.3.60.0060.01318.30
8.3.50.0100.00521.97
8.3.40.0040.01118.67
8.3.30.0040.01118.84
8.3.20.0000.00820.23
8.3.10.0070.00021.82
8.3.00.0060.00319.26
8.2.180.0110.00416.63
8.2.170.0120.00622.96
8.2.160.0070.01019.04
8.2.150.0070.00025.66
8.2.140.0030.00624.66
8.2.130.0050.00322.09
8.2.120.0050.00326.35
8.2.110.0060.00322.10
8.2.100.0060.00617.80
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0040.00417.88
8.2.50.0050.00318.10
8.2.40.0040.00420.47
8.2.30.0030.00519.22
8.2.20.0040.00417.59
8.2.10.0040.00418.04
8.2.00.0060.00318.09
8.1.280.0200.00025.92
8.1.270.0040.00423.91
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0160.00623.93
8.1.230.0070.00417.83
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0040.00417.13
8.1.180.0030.00518.10
8.1.170.0030.00518.50
8.1.160.0040.00421.00
8.1.150.0040.00418.86
8.1.140.0040.00419.60
8.1.130.0000.00717.63
8.1.120.0040.00717.43
8.1.110.0000.00817.37
8.1.100.0040.00417.47
8.1.90.0040.00417.48
8.1.80.0040.00417.47
8.1.70.0000.00717.47
8.1.60.0040.00417.65
8.1.50.0030.00517.54
8.1.40.0000.00917.46
8.1.30.0040.00417.71
8.1.20.0040.00417.70
8.1.10.0000.00817.53
8.1.00.0040.00417.38
8.0.300.0040.00418.77
8.0.290.0050.00216.61
8.0.280.0000.00718.33
8.0.270.0030.00517.11
8.0.260.0040.00417.10
8.0.250.0030.00316.96
8.0.240.0030.00316.82
8.0.230.0000.00716.82
8.0.220.0070.00016.76
8.0.210.0050.00316.81
8.0.200.0040.00416.93
8.0.190.0000.00716.91
8.0.180.0030.00516.91
8.0.170.0050.00316.87
8.0.160.0070.00016.91
8.0.150.0050.00216.80
8.0.140.0030.00316.73
8.0.130.0000.00513.30
8.0.120.0060.00316.77
8.0.110.0040.00416.89
8.0.100.0000.00716.82
8.0.90.0050.00216.86
8.0.80.0000.02316.82
8.0.70.0040.00416.67
8.0.60.0020.00516.82
8.0.50.0040.00416.77
8.0.30.0050.01316.98
8.0.20.0090.01317.40
8.0.10.0040.00416.86
8.0.00.0070.01016.67
7.4.330.0050.00015.08
7.4.320.0000.00616.60
7.4.300.0070.00016.64
7.4.290.0000.00816.64
7.4.280.0030.00616.54
7.4.270.0070.00016.68
7.4.260.0040.00416.60
7.4.250.0030.00516.52
7.4.240.0040.00416.64
7.4.230.0070.00016.65
7.4.220.0060.01116.53
7.4.210.0080.01016.57
7.4.200.0040.00416.29
7.4.160.0090.00616.30
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0100.01116.47
7.4.120.0060.01116.42
7.4.110.0130.00716.45
7.4.100.0030.01316.45
7.4.90.0090.00916.66
7.4.80.0070.01719.39
7.4.70.0060.01016.74
7.4.60.0070.01016.44
7.4.50.0100.00716.20
7.4.40.0110.01116.47
7.4.30.0070.01016.53
7.4.00.0080.00915.12
7.3.330.0000.00513.21
7.3.320.0020.00313.31
7.3.310.0050.00316.34
7.3.300.0040.00416.14
7.3.290.0000.00716.14
7.3.280.0100.00916.33
7.3.270.0130.00317.40
7.3.260.0100.00816.41
7.3.250.0120.00916.40
7.3.240.0060.01016.27
7.3.230.0100.00716.51
7.3.210.0110.00616.44
7.3.200.0130.00416.51
7.3.190.0110.01116.36
7.3.180.0090.00916.21
7.3.170.0090.01216.45
7.3.160.0110.00616.27
7.3.120.0080.00814.85
7.3.110.0040.01214.69
7.3.100.0100.00714.78
7.3.90.0070.00914.62
7.3.80.0040.01114.66
7.3.70.0030.01214.65
7.3.60.0120.00314.76
7.3.50.0030.01214.68
7.3.40.0020.01214.71
7.3.30.0060.00614.75
7.3.20.0030.01116.59
7.3.10.0070.00616.40
7.3.00.0100.00416.34
7.2.330.0100.00716.55
7.2.320.0060.01216.62
7.2.310.0150.00616.40
7.2.300.0100.00716.72
7.2.290.0030.01316.42
7.2.250.0030.01514.97
7.2.240.0050.01414.85
7.2.230.0020.01515.01
7.2.220.0060.00814.85
7.2.210.0030.01215.14
7.2.200.0100.00515.00
7.2.190.0060.00714.98
7.2.180.0050.00914.91
7.2.170.0100.00514.97
7.2.60.0030.00916.90
7.2.00.0060.00619.21
7.1.330.0110.00515.77
7.1.320.0040.00915.80
7.1.310.0040.01215.84
7.1.300.0050.01015.77
7.1.290.0080.00615.79
7.1.280.0080.00915.75
7.1.270.0020.01315.67
7.1.260.0100.00515.82
7.1.200.0060.00615.57
7.1.100.0030.00918.09
7.1.70.0000.01216.99
7.1.60.0040.01119.90
7.1.00.0030.07322.36
7.0.200.0060.00914.79
7.0.80.0130.06720.01
7.0.70.0230.05719.93
7.0.60.0130.06320.03
7.0.50.0300.05020.24
7.0.40.0200.05720.37
7.0.30.0200.06320.28
7.0.20.0230.05720.39
7.0.10.0130.06320.39
7.0.00.0230.06020.36
5.6.280.0100.06321.14
5.6.230.0130.05720.75
5.6.220.0230.05020.56
5.6.210.0170.05720.55
5.6.200.0170.05721.05
5.6.190.0170.05321.05
5.6.180.0030.07321.04
5.6.170.0130.06021.12
5.6.160.0230.06021.11
5.6.150.0170.05721.13
5.6.140.0170.05321.07
5.6.130.0070.07021.06
5.6.120.0170.07021.10
5.6.110.0130.06321.19
5.6.100.0130.05721.09
5.6.90.0100.07721.08
5.6.80.0130.06020.47
5.6.70.0230.06720.48
5.6.60.0170.05020.47
5.6.50.0200.05020.53
5.6.40.0100.05720.58
5.6.30.0130.05320.57
5.6.20.0100.05720.46
5.6.10.0130.05720.39
5.6.00.0100.05320.50
5.5.370.0100.05720.57
5.5.360.0170.07320.45
5.5.350.0170.05720.45
5.5.340.0170.06720.96
5.5.330.0100.06320.79
5.5.320.0200.05720.88
5.5.310.0200.07320.79
5.5.300.0130.05720.96
5.5.290.0200.05320.95
5.5.280.0130.06720.85
5.5.270.0070.06720.92
5.5.260.0130.06020.79
5.5.250.0100.06020.79
5.5.240.0270.04720.22
5.5.230.0170.05720.34
5.5.220.0170.05020.36
5.5.210.0170.05720.29
5.5.200.0170.06020.30
5.5.190.0130.05720.04
5.5.180.0170.05320.05
5.5.160.0100.05720.21
5.5.150.0200.05320.20
5.5.140.0270.04720.30
5.5.130.0170.05720.31
5.5.120.0130.05720.29
5.5.110.0200.05020.25
5.5.100.0030.06720.25
5.5.90.0200.05020.12
5.5.80.0200.05020.15
5.5.70.0130.07720.20
5.5.60.0100.06020.20
5.5.50.0200.04720.20
5.5.40.0170.04720.19
5.5.30.0070.06020.23
5.5.20.0170.05020.18
5.5.10.0100.05720.22
5.5.00.0130.05320.16

preferences:
74.8 ms | 401 KiB | 5 Q