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() { echo getatr1(); $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.0150.00316.75
8.3.50.0110.00821.08
8.3.40.0070.00718.71
8.3.30.0140.00018.71
8.3.20.0040.00420.20
8.3.10.0000.00723.55
8.3.00.0060.00319.50
8.2.180.0120.00318.66
8.2.170.0090.00922.96
8.2.160.0060.00920.53
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0000.01019.05
8.2.120.0080.00026.35
8.2.110.0030.00621.12
8.2.100.0030.00818.09
8.2.90.0000.00819.21
8.2.80.0030.00517.97
8.2.70.0030.00517.63
8.2.60.0080.00017.78
8.2.50.0050.00318.10
8.2.40.0080.00020.60
8.2.30.0000.00720.78
8.2.20.0060.00317.74
8.2.10.0040.00418.11
8.2.00.0040.00417.89
8.1.280.0120.00625.92
8.1.270.0040.00423.84
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0030.00623.92
8.1.230.0130.00017.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0060.00317.22
8.1.180.0060.00318.10
8.1.170.0000.00818.66
8.1.160.0040.00421.84
8.1.150.0070.00018.77
8.1.140.0000.00819.34
8.1.130.0000.00817.59
8.1.120.0050.00217.31
8.1.110.0000.00717.34
8.1.100.0040.00417.34
8.1.90.0020.00517.30
8.1.80.0040.00417.32
8.1.70.0000.00817.29
8.1.60.0080.00017.52
8.1.50.0030.00617.38
8.1.40.0090.00317.41
8.1.30.0030.00617.63
8.1.20.0000.00917.51
8.1.10.0040.00417.42
8.1.00.0050.00217.47
8.0.300.0040.00418.77
8.0.290.0050.00216.88
8.0.280.0070.00018.47
8.0.270.0050.00317.28
8.0.260.0000.00617.28
8.0.250.0070.00016.87
8.0.240.0050.00216.98
8.0.230.0040.00417.01
8.0.220.0050.00216.82
8.0.210.0040.00416.80
8.0.200.0000.00716.95
8.0.190.0040.00416.90
8.0.180.0080.00016.89
8.0.170.0030.00516.93
8.0.160.0000.00716.89
8.0.150.0000.00716.89
8.0.140.0040.00416.71
8.0.130.0000.00513.30
8.0.120.0030.00516.88
8.0.110.0000.00716.89
8.0.100.0040.00416.95
8.0.90.0040.00416.89
8.0.80.0110.00516.86
8.0.70.0000.00716.94
8.0.60.0070.00016.76
8.0.50.0070.00016.79
8.0.30.0090.00917.03
8.0.20.0090.00917.40
8.0.10.0040.00417.03
8.0.00.0090.00916.77
7.4.330.0030.00316.67
7.4.320.0030.00316.54
7.4.300.0030.00316.57
7.4.290.0030.00316.56
7.4.280.0040.00416.51
7.4.270.0000.00816.58
7.4.260.0040.00416.54
7.4.250.0070.00016.38
7.4.240.0020.00516.46
7.4.230.0070.00016.66
7.4.220.0150.01416.59
7.4.210.0040.01416.50
7.4.200.0070.00016.35
7.4.160.0090.00616.63
7.4.150.0060.01217.40
7.4.140.0120.00917.86
7.4.130.0100.01016.42
7.4.120.0080.01016.60
7.4.110.0130.00716.59
7.4.100.0060.01216.48
7.4.90.0140.00316.50
7.4.80.0090.00919.39
7.4.70.0070.01016.52
7.4.60.0130.00316.46
7.4.50.0040.01116.35
7.4.40.0060.00916.65
7.4.30.0070.01016.43
7.4.00.0060.00915.06
7.3.330.0000.00713.16
7.3.320.0030.00313.19
7.3.310.0000.00716.32
7.3.300.0070.00016.27
7.3.290.0080.00016.19
7.3.280.0080.00916.34
7.3.270.0100.00617.40
7.3.260.0140.00416.49
7.3.250.0080.01116.37
7.3.240.0080.01016.50
7.3.230.0030.01616.50
7.3.210.0180.00016.27
7.3.200.0100.00616.40
7.3.190.0130.00616.45
7.3.180.0120.00316.33
7.3.170.0130.00316.46
7.3.160.0140.00416.24
7.3.120.0030.01914.95
7.3.110.0080.00815.02
7.3.100.0100.00714.84
7.3.90.0030.01214.74
7.3.80.0000.01414.79
7.3.70.0030.01314.68
7.3.60.0040.00414.93
7.3.50.0110.00414.50
7.3.40.0060.00914.57
7.3.30.0040.01114.76
7.3.20.0070.01016.46
7.3.10.0060.00916.84
7.3.00.0030.00916.57
7.2.330.0070.01016.70
7.2.320.0090.00916.47
7.2.310.0070.01016.62
7.2.300.0110.00616.54
7.2.290.0120.00616.39
7.2.250.0130.00715.06
7.2.240.0090.00914.96
7.2.230.0060.01015.17
7.2.220.0100.00714.73
7.2.210.0030.01014.85
7.2.200.0110.00014.84
7.2.190.0060.00614.98
7.2.180.0070.00714.94
7.2.170.0000.01114.80
7.2.160.0120.00315.10
7.2.150.0090.00616.88
7.2.140.0090.00616.88
7.2.130.0090.00916.75
7.2.120.0070.01516.80
7.2.110.0110.01116.85
7.2.100.0070.00716.65
7.2.90.0090.00616.87
7.2.80.0070.01116.75
7.2.70.0030.01316.64
7.2.60.0060.00916.84
7.2.50.0070.01116.65
7.2.40.0130.00316.91
7.2.30.0060.01217.00
7.2.20.0070.01116.64
7.2.10.0040.00716.89
7.2.00.0060.01018.05
7.1.330.0070.01015.59
7.1.320.0030.01015.58
7.1.310.0060.00315.44
7.1.300.0000.01515.77
7.1.290.0030.00715.69
7.1.280.0030.00915.70
7.1.270.0030.01315.61
7.1.260.0000.01315.77
7.1.250.0140.00315.61
7.1.240.0040.00815.67
7.1.230.0100.00715.72
7.1.220.0000.01315.54
7.1.210.0100.00715.66
7.1.200.0050.00715.62
7.1.190.0110.00315.58
7.1.180.0000.01315.43
7.1.170.0090.00615.80
7.1.160.0030.01215.60
7.1.150.0090.00615.32
7.1.140.0090.00015.38
7.1.130.0100.00315.79
7.1.120.0090.00015.57
7.1.110.0000.00815.44
7.1.100.0030.01016.84
7.1.90.0120.00315.82
7.1.80.0060.00315.65
7.1.70.0030.00816.25
7.1.60.0050.01217.54
7.1.50.0080.01016.34
7.1.40.0090.00615.77
7.1.30.0000.01015.61
7.1.20.0030.00715.65
7.1.10.0080.00415.79
7.1.00.0050.03619.09
7.0.330.0110.00615.42
7.0.320.0070.00715.31
7.0.310.0030.01315.09
7.0.300.0000.00915.43
7.0.290.0120.00015.08
7.0.280.0040.00415.43
7.0.270.0030.01015.28
7.0.260.0030.00615.39
7.0.250.0040.00715.37
7.0.240.0070.00315.44
7.0.230.0090.00915.13
7.0.220.0040.01115.57
7.0.210.0040.00815.48
7.0.200.0090.00515.10
7.0.190.0100.00315.21
7.0.180.0060.00315.48
7.0.170.0030.01015.33
7.0.160.0040.01115.38
7.0.150.0030.01015.42
7.0.140.0060.00615.38
7.0.130.0100.00315.14
7.0.120.0030.00715.07
7.0.110.0080.00615.45
7.0.100.0070.00715.40
7.0.90.0120.00615.21
7.0.80.0030.00615.35
7.0.70.0040.00415.05
7.0.60.0020.04617.44
7.0.50.0090.03816.64
7.0.40.0040.03116.78
7.0.30.0130.02716.71
7.0.20.0120.04816.65
7.0.10.0030.02616.86
7.0.00.0060.02516.79
5.6.400.0030.00614.10
5.6.390.0070.01114.27
5.6.380.0030.00614.09
5.6.370.0000.01614.28
5.6.360.0080.00813.93
5.6.350.0090.00614.39
5.6.340.0000.01314.14
5.6.330.0040.01214.39
5.6.320.0070.00714.34
5.6.310.0090.00614.09
5.6.300.0030.00614.61
5.6.290.0100.00313.89
5.6.280.0000.02217.51
5.6.270.0000.01314.14
5.6.260.0030.01014.12
5.6.250.0030.01014.12
5.6.240.0040.00414.36
5.6.230.0040.01114.12
5.6.220.0100.00013.85
5.6.210.0120.04017.31
5.6.200.0030.03716.26
5.6.190.0040.02817.34
5.6.180.0120.04617.31
5.6.170.0150.02917.32
5.6.160.0050.02517.30
5.6.150.0090.01716.02
5.6.140.0050.02516.22
5.6.130.0050.04216.26
5.6.120.0100.03717.57
5.6.110.0070.04317.65
5.6.100.0070.04017.57
5.6.90.0170.02517.38
5.6.80.0130.03717.25
5.6.70.0000.01114.38
5.6.60.0000.01013.97
5.6.50.0050.00514.09
5.6.40.0070.00714.09
5.6.30.0000.00913.79
5.6.20.0040.00714.23
5.6.10.0070.00713.98
5.6.00.0100.00714.03
5.5.380.0000.01014.22
5.5.370.0060.00614.06
5.5.360.0000.01214.31
5.5.350.2060.02017.35
5.5.340.0070.02215.94
5.5.330.0090.02417.15
5.5.320.0030.03017.16
5.5.310.0100.02617.10
5.5.300.0050.04816.03
5.5.290.0050.03615.88
5.5.280.0070.04417.42
5.5.270.0100.04017.49
5.5.260.0080.04217.57
5.5.250.0080.03717.28
5.5.240.0170.02417.10
5.5.230.0060.00313.66
5.5.220.0080.00313.95
5.5.210.0110.00414.29
5.5.200.0000.00913.62
5.5.190.0040.00813.84
5.5.180.0040.01213.87
5.5.170.0070.01013.96
5.5.160.0100.00713.87
5.5.150.0100.00613.98
5.5.140.0100.00714.02
5.5.130.0030.01314.18
5.5.120.0030.01013.99
5.5.110.0030.00713.61
5.5.100.0030.00913.91
5.5.90.0000.01313.97
5.5.80.0070.00714.25
5.5.70.0100.00313.96
5.5.60.0040.00814.05
5.5.50.0030.01013.95
5.5.40.0110.00713.93
5.5.30.0070.00713.88
5.5.20.0070.01113.76
5.5.10.0070.00313.96
5.5.00.0100.00313.91

preferences:
40.59 ms | 401 KiB | 5 Q