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->atr1="LOL"; $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.60.0090.00916.75
8.3.50.0160.00622.17
8.3.40.0040.01118.83
8.3.30.0110.00418.63
8.3.20.0040.00420.14
8.3.10.0050.00323.51
8.3.00.0060.00319.26
8.2.180.0120.00316.50
8.2.170.0110.01122.96
8.2.160.0100.00319.41
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0090.00317.75
8.2.120.0100.00326.35
8.2.110.0030.00622.19
8.2.100.0060.00618.05
8.2.90.0080.00019.32
8.2.80.0040.00417.97
8.2.70.0030.00617.49
8.2.60.0030.00618.05
8.2.50.0000.00818.07
8.2.40.0030.00519.41
8.2.30.0070.00020.49
8.2.20.0000.01117.68
8.2.10.0070.00018.18
8.2.00.0050.00218.10
8.1.280.0120.00325.92
8.1.270.0040.00423.91
8.1.260.0120.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00424.03
8.1.230.0120.00019.56
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0090.00017.23
8.1.180.0030.00618.10
8.1.170.0040.00418.59
8.1.160.0000.00721.91
8.1.150.0040.00418.89
8.1.140.0030.00619.57
8.1.130.0000.00817.73
8.1.120.0000.00717.46
8.1.110.0030.00417.41
8.1.100.0000.00817.46
8.1.90.0050.00217.51
8.1.80.0030.00517.40
8.1.70.0030.00317.27
8.1.60.0040.00417.50
8.1.50.0040.00417.53
8.1.40.0040.00717.51
8.1.30.0000.00817.48
8.1.20.0020.00517.52
8.1.10.0060.00317.46
8.1.00.0000.00817.50
8.0.300.0050.00218.77
8.0.290.0040.00416.63
8.0.280.0070.00018.46
8.0.270.0040.00417.20
8.0.260.0030.00617.25
8.0.250.0070.00016.87
8.0.240.0000.00716.97
8.0.230.0030.00316.97
8.0.220.0080.00016.88
8.0.210.0060.00316.76
8.0.200.0000.00616.95
8.0.190.0000.00716.88
8.0.180.0080.00016.77
8.0.170.0000.01016.91
8.0.160.0040.00416.91
8.0.150.0040.00416.75
8.0.140.0030.00316.81
8.0.130.0050.00013.40
8.0.120.0000.00816.84
8.0.110.0020.00516.88
8.0.100.0070.00016.92
8.0.90.0090.00016.67
8.0.80.0130.00316.82
8.0.70.0050.00216.79
8.0.60.0000.00716.80
8.0.50.0000.00716.84
8.0.30.0090.00916.95
8.0.20.0090.00917.40
8.0.10.0040.00416.93
8.0.00.0110.00716.68
7.4.330.0000.00616.70
7.4.320.0030.00316.55
7.4.300.0030.00316.61
7.4.290.0040.00416.59
7.4.280.0090.00016.60
7.4.270.0070.00016.65
7.4.260.0020.00516.41
7.4.250.0040.00416.36
7.4.240.0040.00416.48
7.4.230.0030.00316.67
7.4.220.0130.01316.61
7.4.210.0040.01116.43
7.4.200.0000.00716.62
7.4.160.0030.01316.48
7.4.150.0180.01817.40
7.4.140.0160.00817.86
7.4.130.0120.01116.48
7.4.120.0100.00716.49
7.4.110.0100.01316.62
7.4.100.0150.00816.66
7.4.90.0080.00816.43
7.4.80.0080.00819.39
7.4.70.0070.01116.52
7.4.60.0110.00616.54
7.4.50.0110.00316.41
7.4.40.0040.01616.39
7.4.30.0110.01116.51
7.4.00.0060.01014.80
7.3.330.0000.00513.14
7.3.320.0000.00613.39
7.3.310.0040.00416.25
7.3.300.0030.00316.23
7.3.290.0070.00716.30
7.3.280.0060.01016.32
7.3.270.0100.00717.40
7.3.260.0060.01216.28
7.3.250.0110.00616.42
7.3.240.0100.00816.60
7.3.230.0090.00916.60
7.3.210.0100.00716.71
7.3.200.0110.00616.57
7.3.190.0100.01316.60
7.3.180.0060.01216.30
7.3.170.0110.00816.67
7.3.160.0150.00316.59
7.3.10.0090.00616.73
7.3.00.0000.01316.58
7.2.330.0060.01216.87
7.2.320.0120.00616.53
7.2.310.0130.00316.84
7.2.300.0060.01716.51
7.2.290.0170.00316.86
7.2.130.0040.01316.91
7.2.120.0100.00316.98
7.2.110.0160.00617.04
7.2.100.0030.00616.86
7.2.90.0030.00917.10
7.2.80.0100.00017.10
7.2.70.0060.01016.97
7.2.60.0110.00416.78
7.2.50.0030.01216.98
7.2.40.0070.01016.82
7.2.30.0000.01116.97
7.2.20.0030.01017.05
7.2.10.0000.01216.63
7.2.00.0040.00816.39
7.1.250.0100.00415.93
7.1.70.0030.00717.25
7.1.60.0070.01819.48
7.1.50.0090.01216.85
7.1.00.0070.07322.43
7.0.200.0250.00314.73
7.0.60.0070.06319.92
7.0.50.0070.06717.87
7.0.40.0100.08320.36
7.0.30.0300.08020.23
7.0.20.0430.06720.26
7.0.10.0200.07320.21
7.0.00.0100.07020.06
5.6.280.0030.04320.84
5.6.210.0030.06720.78
5.6.200.0130.06318.28
5.6.190.0100.08720.63
5.6.180.0300.04720.61
5.6.170.0200.04020.50
5.6.160.0000.08020.42
5.6.150.0030.04318.20
5.6.140.0070.08018.18
5.6.130.0100.03718.27
5.6.120.0100.08020.91
5.6.110.0070.08720.98
5.6.100.0000.04321.01
5.6.90.0130.07721.14
5.6.80.0100.08720.40
5.5.350.3670.03720.39
5.5.340.0030.05317.99
5.5.330.0030.04020.28
5.5.320.0100.06020.36
5.5.310.0100.08020.20
5.5.300.0130.07317.97
5.5.290.0030.05017.98
5.5.280.0100.07720.86
5.5.270.0170.07020.77
5.5.260.0100.05720.66
5.5.250.0070.07320.73
5.5.240.0330.06720.16

preferences:
51.02 ms | 401 KiB | 5 Q