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.0110.01117.00
8.3.50.0100.01021.97
8.3.40.0190.00018.82
8.3.30.0070.01418.98
8.3.20.0090.00619.95
8.3.10.0150.00423.57
8.3.00.0060.00319.51
8.2.180.0120.00616.50
8.2.170.0060.01322.96
8.2.160.0070.00720.38
8.2.150.0120.00624.18
8.2.140.0000.01824.66
8.2.130.0030.00619.36
8.2.120.0040.00426.35
8.2.110.0040.00419.31
8.2.100.0040.00818.05
8.2.90.0050.00319.30
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0030.00517.93
8.2.50.0050.00318.07
8.2.40.0030.00619.28
8.2.30.0000.00720.62
8.2.20.0000.00917.74
8.2.10.0040.00418.01
8.2.00.0000.00818.00
8.1.280.0110.00425.92
8.1.270.0060.00323.92
8.1.260.0140.00428.09
8.1.250.0110.00728.09
8.1.240.0030.00619.54
8.1.230.0000.01119.57
8.1.220.0060.00317.80
8.1.210.0090.00018.77
8.1.200.0040.00417.36
8.1.190.0000.00917.22
8.1.180.0070.00018.10
8.1.170.0030.00618.63
8.1.160.0040.00422.06
8.1.150.0050.00318.79
8.1.140.0060.00319.57
8.1.130.0040.00417.70
8.1.120.0000.00717.35
8.1.110.0070.00017.35
8.1.100.0050.00317.38
8.1.90.0040.00417.51
8.1.80.0030.00517.50
8.1.70.0030.00317.32
8.1.60.0040.00417.49
8.1.50.0000.01017.52
8.1.40.0060.00317.41
8.1.30.0080.00017.68
8.1.20.0000.00817.53
8.1.10.0000.00817.58
8.1.00.0040.00417.40
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0070.00018.49
8.0.270.0040.00417.25
8.0.260.0060.00017.18
8.0.250.0070.00016.97
8.0.240.0040.00417.00
8.0.230.0000.00717.00
8.0.220.0030.00316.97
8.0.210.0080.00016.90
8.0.200.0030.00317.02
8.0.190.0000.00717.03
8.0.180.0040.00416.90
8.0.170.0060.00317.03
8.0.160.0030.00317.04
8.0.150.0000.00716.98
8.0.140.0060.00316.82
8.0.130.0000.00513.31
8.0.120.0050.00316.91
8.0.110.0040.00416.94
8.0.100.0040.00416.95
8.0.90.0070.00016.87
8.0.80.0080.00816.92
8.0.70.0050.00316.90
8.0.60.0040.00416.98
8.0.50.0040.00316.76
8.0.30.0080.01117.13
8.0.20.0090.01117.40
8.0.10.0000.00716.96
8.0.00.0080.00816.82
7.4.330.0050.00016.67
7.4.320.0070.00016.53
7.4.300.0030.00316.43
7.4.290.0000.00716.52
7.4.280.0000.00716.43
7.4.270.0050.00316.60
7.4.260.0070.00016.64
7.4.250.0070.00016.48
7.4.240.0020.00616.52
7.4.230.0030.00316.54
7.4.220.0100.01016.46
7.4.210.0070.01116.58
7.4.200.0050.00216.56
7.4.160.0060.01016.62
7.4.150.0030.01517.40
7.4.140.0180.00417.86
7.4.130.0110.00916.56
7.4.120.0110.00716.49
7.4.110.0070.01116.53
7.4.100.0120.00616.62
7.4.90.0030.01416.56
7.4.80.0130.00319.39
7.4.70.0080.01216.47
7.4.60.0060.00916.61
7.4.50.0040.00816.36
7.4.40.0050.01116.34
7.4.30.0140.00316.66
7.4.00.0090.00614.84
7.3.330.0020.00213.33
7.3.320.0000.00613.42
7.3.310.0050.00316.47
7.3.300.0030.00316.33
7.3.290.0000.00716.39
7.3.280.0060.01016.48
7.3.270.0070.01117.40
7.3.260.0100.00716.36
7.3.250.0130.00516.58
7.3.240.0080.00916.56
7.3.230.0060.01216.61
7.3.210.0100.00716.47
7.3.200.0030.01216.53
7.3.190.0060.01116.55
7.3.180.0030.01316.37
7.3.170.0090.00916.45
7.3.160.0070.01716.30
7.3.10.0000.01716.60
7.3.00.0120.00316.79
7.2.330.0140.00316.68
7.2.320.0120.00616.76
7.2.310.0000.01816.58
7.2.300.0090.00916.75
7.2.290.0090.01016.70
7.2.130.0100.00717.14
7.2.120.0090.00617.02
7.2.110.0000.01317.01
7.2.100.0090.00617.05
7.2.90.0070.01016.91
7.2.80.0110.00016.94
7.2.70.0040.00816.94
7.2.60.0050.00616.94
7.2.50.0100.00316.72
7.2.40.0060.00916.95
7.2.30.0040.01416.92
7.2.20.0040.00716.76
7.2.10.0030.01416.94
7.2.00.0070.00718.15
7.1.250.0060.00916.01
7.1.200.0070.00715.39
7.1.100.0070.00718.14
7.1.70.0000.00917.07
7.1.60.0160.01019.48
7.1.50.0060.01616.86
7.1.00.0070.07322.51
7.0.200.0410.00414.73
7.0.60.0000.08319.94
7.0.50.0070.08317.87
7.0.40.0100.04020.26
7.0.30.0170.04020.17
7.0.20.0300.06720.10
7.0.10.0170.08020.24
7.0.00.0000.08020.06
5.6.280.0000.04720.88
5.6.210.0070.04020.70
5.6.200.0000.08718.18
5.6.190.0070.08320.67
5.6.180.0270.08020.47
5.6.170.0300.06020.47
5.6.160.0070.09020.54
5.6.150.0030.05318.19
5.6.140.0030.05718.12
5.6.130.0070.03718.14
5.6.120.0100.08021.01
5.6.110.0170.07321.02
5.6.100.0100.08321.12
5.6.90.0070.08021.14
5.6.80.0170.06020.42
5.5.350.4270.04320.44
5.5.340.0070.08017.98
5.5.330.0030.07720.27
5.5.320.0100.08020.27
5.5.310.0270.05020.51
5.5.300.0100.08017.98
5.5.290.0070.03718.04
5.5.280.0170.07320.89
5.5.270.0070.05320.74
5.5.260.0130.07320.66
5.5.250.0070.06020.67
5.5.240.0270.07320.18

preferences:
49.34 ms | 401 KiB | 5 Q