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; } function getatr1() { return $this->atr1; } function getatr2() { return $this->atr2; } 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'); $pole = array($obj1, $obj2, $obj3); return $pole; } function tabulka() { $table_str='<table>'; $table=napln(); foreach($table as $tab) { echo getatr1(); $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.0060.00916.63
8.3.50.0100.00922.00
8.3.40.0100.00718.84
8.3.30.0110.00418.79
8.3.20.0000.00820.34
8.3.10.0080.00023.43
8.3.00.0080.00019.38
8.2.180.0000.01518.29
8.2.170.0040.01522.96
8.2.160.0100.00320.57
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0100.00019.48
8.2.120.0000.00726.35
8.2.110.0060.00320.56
8.2.100.0040.00817.91
8.2.90.0080.00019.38
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0000.00817.93
8.2.50.0090.00018.10
8.2.40.0080.00020.56
8.2.30.0040.00420.53
8.2.20.0040.00417.70
8.2.10.0040.00418.12
8.2.00.0050.00218.09
8.1.280.0120.00625.92
8.1.270.0050.00523.98
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0050.00521.95
8.1.230.0040.00821.04
8.1.220.0000.00817.78
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0080.00018.51
8.1.160.0040.00422.02
8.1.150.0000.00718.78
8.1.140.0030.00619.45
8.1.130.0000.00717.76
8.1.120.0000.00717.51
8.1.110.0000.00717.38
8.1.100.0040.00417.49
8.1.90.0070.00017.53
8.1.80.0000.00717.32
8.1.70.0030.00517.47
8.1.60.0000.00717.57
8.1.50.0080.00017.45
8.1.40.0060.00617.43
8.1.30.0070.00317.67
8.1.20.0030.00517.65
8.1.10.0040.00417.60
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.40
8.0.270.0070.00017.27
8.0.260.0060.00017.26
8.0.250.0050.00317.02
8.0.240.0030.00317.01
8.0.230.0000.00817.05
8.0.220.0000.00716.95
8.0.210.0040.00317.03
8.0.200.0030.00316.92
8.0.190.0080.00017.05
8.0.180.0040.00416.99
8.0.170.0080.00016.97
8.0.160.0040.00416.95
8.0.150.0040.00416.87
8.0.140.0050.00216.94
8.0.130.0000.00513.38
8.0.120.0050.00316.93
8.0.110.0060.00316.89
8.0.100.0040.00416.89
8.0.90.0050.00216.80
8.0.80.0100.00616.99
8.0.70.0070.00016.93
8.0.60.0000.00816.84
8.0.50.0050.00216.86
8.0.30.0090.01117.22
8.0.20.0110.00717.40
8.0.10.0000.00717.09
8.0.00.0110.00616.78
7.4.330.0000.00516.67
7.4.320.0030.00316.61
7.4.300.0070.00016.53
7.4.290.0000.00716.63
7.4.280.0000.00716.42
7.4.270.0000.00816.63
7.4.260.0070.00016.62
7.4.250.0090.00016.59
7.4.240.0000.00716.60
7.4.230.0040.00416.52
7.4.220.0060.01216.56
7.4.210.0150.00516.57
7.4.200.0000.00716.37
7.4.160.0120.00316.40
7.4.150.0100.00717.40
7.4.140.0090.01317.86
7.4.130.0110.00616.52
7.4.120.0110.00616.58
7.4.110.0030.01416.53
7.4.100.0150.00916.63
7.4.90.0100.00716.59
7.4.80.0060.01019.39
7.4.70.0130.00316.50
7.4.60.0170.00016.49
7.4.50.0070.00716.50
7.4.40.0050.01116.63
7.4.30.0000.01616.51
7.4.00.0090.00614.97
7.3.330.0050.00313.34
7.3.320.0000.00613.40
7.3.310.0030.00316.34
7.3.300.0040.00416.45
7.3.290.0070.00016.40
7.3.280.0080.01016.33
7.3.270.0090.00817.40
7.3.260.0070.01016.65
7.3.250.0050.01316.39
7.3.240.0130.00716.69
7.3.230.0070.01816.39
7.3.210.0070.01016.48
7.3.200.0090.00916.38
7.3.190.0030.01316.68
7.3.180.0090.00616.39
7.3.170.0080.00816.59
7.3.160.0100.01016.36
7.3.10.0040.01116.60
7.3.00.0110.00316.67
7.2.330.0070.01116.45
7.2.320.0030.01516.74
7.2.310.0070.01116.79
7.2.300.0030.01416.43
7.2.290.0090.01316.58
7.2.130.0070.01016.68
7.2.120.0040.00717.03
7.2.110.0030.00616.99
7.2.100.0070.00716.95
7.2.90.0070.00716.75
7.2.80.0000.01216.84
7.2.70.0060.00916.95
7.2.60.0120.00616.55
7.2.50.0030.00717.10
7.2.40.0080.00617.04
7.2.30.0090.00616.67
7.2.20.0000.01416.77
7.2.10.0000.00917.00
7.2.00.0060.00918.33
7.1.250.0030.01015.61
7.1.200.0040.01115.61
7.1.100.0060.00618.33
7.1.70.0030.00616.94
7.1.60.0040.02119.48
7.1.50.0080.00316.86
7.1.00.0030.07722.45
7.0.200.0160.01014.91
7.0.60.0130.07719.91
7.0.50.0000.09017.94
7.0.40.0070.05720.22
7.0.30.0270.03720.19
7.0.20.0230.05320.23
7.0.10.0030.07020.12
7.0.00.0070.04020.20
5.6.280.0000.03321.01
5.6.210.0100.04020.64
5.6.200.0100.03718.29
5.6.190.0130.08020.41
5.6.180.0400.04020.48
5.6.170.0300.07720.55
5.6.160.0000.06020.55
5.6.150.0030.05018.27
5.6.140.0070.07318.28
5.6.130.0130.07318.18
5.6.120.0100.04321.00
5.6.110.0170.07021.00
5.6.100.0070.08021.00
5.6.90.0170.04721.02
5.6.80.0070.06320.36
5.5.350.4230.04020.45
5.5.340.0130.06717.96
5.5.330.0130.07720.42
5.5.320.0130.08020.36
5.5.310.0230.06720.19
5.5.300.0100.08317.95
5.5.290.0070.08317.98
5.5.280.0070.06020.74
5.5.270.0100.06020.77
5.5.260.0070.08320.78
5.5.250.0130.04720.56
5.5.240.0830.06720.17

preferences:
49.89 ms | 401 KiB | 5 Q