3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { public $atr1; public $atr2; public $atr3; function _construct($atr1,$atr2,$atr3) { $this->atr1=$atr1; $this->atr2=$atr2; $this->atr3=$atr3; } public function getatr1() { return $this->atr1; } public function getatr2() { return $this->atr2; } public function getatr3() { return $this->atr3; } } function napln() { $obj1 = new Car("renault","modra",'nieco'); $obj2 = new Car('skoda','zelena','neviem'); $obj3 = new Car('opel','cervena','cojaviem'); echo ($obj1->getatr1()); $pole = array($obj1, $obj2, $obj3); return $pole; } function tabulka() { $table_str='<table>'; $table=napln(); foreach($table as $tab) { $table_str.= '<tr>'; $table_str.='<td>'.$tab -> getatr1().'</td><td>'.$tab -> getatr2().'</td><td>'.$tab -> getatr3().'</td>'; $table_str.='</tr>'; } $table_str.='</table>'; return $table_str; } ?> <html> <head> <title>Page Title</title> </head> <body> <?php echo tabulka(); ?> </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.0090.01216.63
8.3.50.0150.00521.14
8.3.40.0070.01118.79
8.3.30.0110.00418.81
8.3.20.0070.00020.30
8.3.10.0070.00023.71
8.3.00.0030.00519.38
8.2.180.0040.01116.50
8.2.170.0070.00722.96
8.2.160.0070.00720.12
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00517.63
8.2.120.0040.00426.35
8.2.110.0060.00320.35
8.2.100.0060.00618.16
8.2.90.0040.00419.19
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0000.00817.68
8.2.50.0050.00318.07
8.2.40.0040.00419.23
8.2.30.0000.00720.61
8.2.20.0030.00617.66
8.2.10.0030.00718.27
8.2.00.0040.00418.11
8.1.280.0060.00925.92
8.1.270.0000.00923.96
8.1.260.0080.00028.09
8.1.250.0030.00528.09
8.1.240.0080.00324.03
8.1.230.0090.00319.55
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0040.00418.58
8.1.160.0000.00722.06
8.1.150.0040.00418.94
8.1.140.0000.00819.58
8.1.130.0000.00717.58
8.1.120.0040.00417.52
8.1.110.0040.00417.41
8.1.100.0040.00417.42
8.1.90.0030.00517.49
8.1.80.0030.00617.45
8.1.70.0000.00717.41
8.1.60.0000.00917.62
8.1.50.0030.00617.51
8.1.40.0000.01017.44
8.1.30.0000.00817.70
8.1.20.0000.00717.57
8.1.10.0050.00217.50
8.1.00.0030.00617.43
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.45
8.0.270.0040.00317.27
8.0.260.0070.00017.20
8.0.250.0030.00316.92
8.0.240.0000.00816.95
8.0.230.0040.00416.98
8.0.220.0030.00316.77
8.0.210.0040.00416.91
8.0.200.0000.00616.97
8.0.190.0000.00816.86
8.0.180.0040.00416.96
8.0.170.0040.00416.85
8.0.160.0080.00016.95
8.0.150.0040.00416.85
8.0.140.0000.00716.76
8.0.130.0050.00013.41
8.0.120.0040.00416.87
8.0.110.0050.00316.86
8.0.100.0050.00216.81
8.0.90.0040.00416.70
8.0.80.0000.01816.88
8.0.70.0070.00016.70
8.0.60.0000.00816.70
8.0.50.0040.00416.77
8.0.30.0110.00817.14
8.0.20.0120.00717.40
8.0.10.0020.00516.96
8.0.00.0090.00816.87
7.4.330.0050.00016.67
7.4.320.0000.00716.48
7.4.300.0030.00316.52
7.4.290.0000.00616.51
7.4.280.0040.00416.62
7.4.270.0000.00716.57
7.4.260.0040.00416.51
7.4.250.0030.00516.47
7.4.240.0030.00416.50
7.4.230.0030.00316.55
7.4.220.0150.00316.63
7.4.210.0090.00716.63
7.4.200.0040.00416.42
7.4.160.0100.00616.69
7.4.150.0080.01217.40
7.4.140.0090.01117.86
7.4.130.0130.00716.58
7.4.120.0110.00616.52
7.4.110.0170.00616.52
7.4.100.0100.00716.51
7.4.90.0120.00616.65
7.4.80.0100.00619.39
7.4.70.0030.01316.58
7.4.60.0060.00916.56
7.4.50.0030.01216.47
7.4.40.0140.00316.44
7.4.30.0130.00916.57
7.4.00.0090.00315.10
7.3.330.0060.00013.33
7.3.320.0000.00613.27
7.3.310.0000.00716.28
7.3.300.0050.00216.36
7.3.290.0070.00016.40
7.3.280.0050.01416.33
7.3.270.0090.00917.40
7.3.260.0120.00616.62
7.3.250.0120.00816.60
7.3.240.0070.01016.62
7.3.230.0120.00616.45
7.3.210.0070.01516.48
7.3.200.0100.00716.38
7.3.190.0060.01116.44
7.3.180.0130.01016.43
7.3.170.0090.01316.32
7.3.160.0080.00916.59
7.2.330.0100.00716.49
7.2.320.0060.01316.75
7.2.310.0140.00616.49
7.2.300.0140.00316.59
7.2.290.0120.00916.57
7.2.00.0150.00919.04
7.1.100.0030.01018.03
7.1.70.0070.00417.09
7.1.60.0070.00317.29
7.1.50.0030.00916.90
7.1.00.0070.07322.36
7.0.200.0030.01316.87
7.0.60.0130.08019.95
7.0.50.0070.04317.90
7.0.40.0100.06720.21
7.0.30.0270.07720.20
7.0.20.0270.07720.23
7.0.10.0130.05720.08
7.0.00.0000.07020.05
5.6.280.0030.07320.93
5.6.210.0000.08020.52
5.6.200.0030.05318.25
5.6.190.0270.03020.38
5.6.180.0400.07320.48
5.6.170.0270.06020.39
5.6.160.0030.07720.50
5.6.150.0070.04718.25
5.6.140.0000.05018.27
5.6.130.0270.03018.14
5.6.120.0130.05721.14
5.6.110.0230.05721.03
5.6.100.0100.08321.00
5.6.90.0070.07021.05
5.6.80.0100.06720.39
5.5.350.4530.04020.44
5.5.340.0100.09018.05
5.5.330.0130.08020.25
5.5.320.0030.04320.51
5.5.310.0200.03720.34
5.5.300.0000.05017.97
5.5.290.0030.06717.94
5.5.280.0030.06020.83
5.5.270.0130.05320.81
5.5.260.0100.04320.89
5.5.250.0170.07720.71
5.5.240.0130.03020.17

preferences:
31.89 ms | 401 KiB | 5 Q