3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { public $atr1; public $atr2; public $atr3; public function _construct($atr1,$atr2,$atr3) { $this->atr1=$atr1; $this->atr1="LOL"; echo "constructor"; echo $this->atr1; $this->atr2=$atr2; $this->atr3=$atr3; } public function getatr1() { echo "function echo"; echo $this->atr1; 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 "tuto"; echo $obj1->getatr1(); echo "tuto"; $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.70.0060.00918.43
8.3.60.0140.00716.63
8.3.50.0130.00922.05
8.3.40.0120.00319.02
8.3.30.0090.00618.73
8.3.20.0050.00320.16
8.3.10.0080.00023.61
8.3.00.0080.00019.38
8.2.180.0140.00718.41
8.2.170.0170.00322.96
8.2.160.0120.00320.51
8.2.150.0000.01424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.36
8.2.120.0100.00326.35
8.2.110.0090.00020.35
8.2.100.0030.01017.93
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0060.00318.04
8.2.50.0040.00418.07
8.2.40.0050.00319.41
8.2.30.0000.00720.67
8.2.20.0030.00617.81
8.2.10.0000.00818.00
8.2.00.0000.00817.99
8.1.280.0090.00925.92
8.1.270.0060.00323.93
8.1.260.0070.00028.09
8.1.250.0110.00428.09
8.1.240.0040.00423.80
8.1.230.0060.00619.56
8.1.220.0050.00317.76
8.1.210.0040.00418.77
8.1.200.0060.00317.10
8.1.190.0050.00517.22
8.1.180.0040.00418.10
8.1.170.0030.00518.78
8.1.160.0040.00422.00
8.1.150.0070.00018.76
8.1.140.0000.00719.49
8.1.130.0000.00817.74
8.1.120.0040.00417.38
8.1.110.0040.00417.44
8.1.100.0040.00417.37
8.1.90.0030.00517.35
8.1.80.0000.00817.43
8.1.70.0060.00317.35
8.1.60.0000.00917.58
8.1.50.0000.00817.53
8.1.40.0000.00817.52
8.1.30.0030.00617.69
8.1.20.0000.00817.54
8.1.10.0040.00417.52
8.1.00.0040.00417.43
8.0.300.0040.00418.77
8.0.290.0050.00216.63
8.0.280.0000.00718.35
8.0.270.0000.00717.16
8.0.260.0100.00017.25
8.0.250.0040.00416.87
8.0.240.0000.00716.92
8.0.230.0030.00316.96
8.0.220.0030.00316.79
8.0.210.0110.00016.93
8.0.200.0030.00316.96
8.0.190.0060.00316.85
8.0.180.0040.00416.80
8.0.170.0080.00416.81
8.0.160.0000.00816.89
8.0.150.0000.00716.82
8.0.140.0040.00416.80
8.0.130.0000.00513.27
8.0.120.0060.00316.77
8.0.110.0070.00016.82
8.0.100.0040.00416.72
8.0.90.0000.00716.82
8.0.80.0130.00316.85
8.0.70.0040.00416.87
8.0.60.0040.00416.94
8.0.50.0050.00216.74
8.0.30.0090.00817.18
8.0.20.0100.01017.40
8.0.10.0000.00817.02
8.0.00.0100.00716.84
7.4.330.0020.00216.83
7.4.320.0000.00716.59
7.4.300.0030.00316.51
7.4.290.0040.00416.58
7.4.280.0030.00716.61
7.4.270.0030.00316.59
7.4.260.0000.00916.49
7.4.250.0040.00416.46
7.4.240.0030.00416.57
7.4.230.0000.00716.40
7.4.220.0100.01016.45
7.4.210.0090.00616.63
7.4.200.0040.00416.40
7.4.160.0060.00916.53
7.4.150.0000.01717.40
7.4.140.0140.01117.86
7.4.130.0090.01116.52
7.4.120.0130.00416.65
7.4.110.0140.00316.41
7.4.100.0120.00916.36
7.4.90.0130.00416.48
7.4.80.0100.00619.39
7.4.70.0060.01216.33
7.4.60.0050.01116.48
7.4.50.0000.01816.30
7.4.40.0080.00816.28
7.4.30.0120.00616.55
7.4.00.0130.00314.82
7.3.330.0000.00513.10
7.3.320.0000.00513.18
7.3.310.0030.00316.45
7.3.300.0000.00716.20
7.3.290.0110.00616.33
7.3.280.0080.00916.30
7.3.270.0150.00817.40
7.3.260.0160.00716.39
7.3.250.0070.01116.44
7.3.240.0030.01616.39
7.3.230.0140.00416.45
7.3.210.0130.00316.73
7.3.200.0060.01016.36
7.3.190.0030.01316.58
7.3.180.0120.00916.46
7.3.170.0110.00616.45
7.3.160.0110.01116.32
7.3.120.0090.00614.90
7.3.110.0120.00315.12
7.3.100.0030.01314.96
7.3.90.0040.00814.96
7.3.80.0090.00314.91
7.3.70.0030.00715.03
7.3.60.0030.00714.93
7.3.50.0040.00714.89
7.3.40.0070.00314.90
7.3.30.0030.00614.86
7.3.20.0100.00016.75
7.3.10.0090.00616.34
7.3.00.0030.00916.37
7.2.330.0060.01116.80
7.2.320.0100.00716.67
7.2.310.0060.01016.83
7.2.300.0160.00616.52
7.2.290.0100.01116.77
7.2.240.0040.01115.00
7.2.230.0040.00715.21
7.2.220.0040.01215.04
7.2.210.0000.01715.11
7.2.200.0000.01514.83
7.2.190.0000.01615.20
7.2.180.0070.01015.18
7.2.170.0070.01014.85
7.2.160.0090.00615.03
7.2.150.0060.00916.86
7.2.140.0060.00617.11
7.2.130.0100.00616.96
7.2.120.0000.01116.97
7.2.110.0100.00716.99
7.2.100.0000.01616.91
7.2.90.0130.00316.83
7.2.80.0040.00717.01
7.2.70.0040.01116.88
7.2.60.0140.00016.81
7.2.50.0100.00716.84
7.2.40.0060.00917.02
7.2.30.0040.00717.14
7.2.20.0100.00716.93
7.2.10.0060.00916.85
7.2.00.0020.01318.06
7.1.330.0060.00915.83
7.1.320.0070.01015.77
7.1.310.0040.00715.82
7.1.300.0060.00615.92
7.1.290.0040.01115.90
7.1.280.0070.00715.85
7.1.270.0030.01415.54
7.1.260.0100.00315.91
7.1.250.0070.00716.00
7.1.100.0050.00518.01
7.1.70.0060.00917.22
7.1.60.0040.00717.30
7.1.50.0100.01016.95
7.1.00.0070.07322.33
7.0.200.0060.00916.80
7.0.60.0070.06319.88
7.0.50.0070.08018.00
7.0.40.0030.07020.10
7.0.30.0230.05020.21
7.0.20.0370.06320.28
7.0.10.0130.08020.23
7.0.00.0070.06320.21
5.6.280.0000.03321.11
5.6.210.0100.05020.57
5.6.200.0070.07718.16
5.6.190.0030.05020.72
5.6.180.0330.06020.52
5.6.170.0130.04720.56
5.6.160.0130.07320.57
5.6.150.0070.03718.19
5.6.140.0130.07018.27
5.6.130.0070.06718.17
5.6.120.0030.09321.16
5.6.110.0070.08720.96
5.6.100.0070.03721.15
5.6.90.0100.06721.10
5.6.80.0070.07320.55
5.5.350.4270.03720.34
5.5.340.0030.04318.05
5.5.330.0030.05320.40
5.5.320.0100.06320.37
5.5.310.0200.03720.41
5.5.300.0100.08017.97
5.5.290.0030.04317.95
5.5.280.0130.05320.89
5.5.270.0000.05720.74
5.5.260.0070.07320.85
5.5.250.0070.07320.79
5.5.240.0300.06720.36

preferences:
52.61 ms | 401 KiB | 5 Q