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"; 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.0110.00418.30
8.3.60.0070.01116.63
8.3.50.0120.01021.98
8.3.40.0070.00718.80
8.3.30.0110.00418.71
8.3.20.0050.00320.16
8.3.10.0030.00623.56
8.3.00.0090.00019.18
8.2.190.0080.00818.18
8.2.180.0110.00416.38
8.2.170.0120.00322.96
8.2.160.0130.00320.38
8.2.150.0030.00624.18
8.2.140.0000.00724.66
8.2.130.0060.00317.75
8.2.120.0070.00726.35
8.2.110.0060.00318.99
8.2.100.0040.00818.04
8.2.90.0040.00419.30
8.2.80.0050.00317.97
8.2.70.0050.00317.75
8.2.60.0040.00417.93
8.2.50.0000.00818.09
8.2.40.0000.00920.47
8.2.30.0070.00019.54
8.2.20.0060.00317.65
8.2.10.0040.00418.00
8.2.00.0000.00718.16
8.1.280.0040.01125.92
8.1.270.0030.00623.77
8.1.260.0000.00728.09
8.1.250.0080.00628.09
8.1.240.0090.00022.62
8.1.230.0080.00317.89
8.1.220.0040.00417.75
8.1.210.0050.00318.77
8.1.200.0000.01017.35
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0050.00518.37
8.1.160.0040.00420.77
8.1.150.0040.00418.66
8.1.140.0030.00519.57
8.1.130.0050.00217.61
8.1.120.0040.00417.44
8.1.110.0000.00817.36
8.1.100.0040.00417.38
8.1.90.0040.00417.45
8.1.80.0070.00017.43
8.1.70.0000.00717.40
8.1.60.0030.00517.57
8.1.50.0000.00917.44
8.1.40.0040.00417.51
8.1.30.0040.00417.63
8.1.20.0050.00217.63
8.1.10.0030.00617.46
8.1.00.0040.00417.47
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00518.44
8.0.270.0000.00717.19
8.0.260.0000.00717.19
8.0.250.0040.00417.02
8.0.240.0040.00416.82
8.0.230.0040.00417.02
8.0.220.0080.00016.89
8.0.210.0100.00016.78
8.0.200.0000.00616.88
8.0.190.0030.00516.85
8.0.180.0080.00016.80
8.0.170.0070.00316.84
8.0.160.0030.00317.02
8.0.150.0000.00716.82
8.0.140.0000.00716.82
8.0.130.0030.00313.38
8.0.120.0040.00416.91
8.0.110.0040.00416.73
8.0.100.0040.00416.78
8.0.90.0040.00416.80
8.0.80.0070.00716.84
8.0.70.0000.00716.68
8.0.60.0000.00816.99
8.0.50.0040.00416.83
8.0.30.0120.00617.11
8.0.20.0100.00917.42
8.0.10.0040.00417.13
8.0.00.0090.00816.69
7.4.330.0020.00216.83
7.4.320.0050.00216.58
7.4.300.0000.00616.65
7.4.290.0030.00316.53
7.4.280.0040.00416.60
7.4.270.0070.00016.59
7.4.260.0030.00316.46
7.4.250.0040.00416.48
7.4.240.0020.00516.59
7.4.230.0030.00316.32
7.4.220.0060.01416.47
7.4.210.0130.00016.61
7.4.200.0000.00716.58
7.4.160.0060.01016.41
7.4.150.0130.00417.40
7.4.140.0160.00717.86
7.4.130.0080.01116.53
7.4.120.0070.01216.58
7.4.110.0060.01316.46
7.4.100.0040.01316.49
7.4.90.0120.00616.71
7.4.80.0130.00419.39
7.4.70.0060.01616.40
7.4.60.0100.00616.41
7.4.50.0070.01116.56
7.4.40.0040.01916.37
7.4.30.0120.00916.41
7.4.10.0080.00914.98
7.4.00.0080.00815.13
7.3.330.0000.00513.28
7.3.320.0060.00013.23
7.3.310.0000.00816.36
7.3.300.0030.00316.31
7.3.290.0060.00916.26
7.3.280.0110.00416.30
7.3.270.0110.00617.40
7.3.260.0130.00416.28
7.3.250.0080.00916.54
7.3.240.0090.01216.54
7.3.230.0140.00316.60
7.3.210.0070.01016.61
7.3.200.0130.00716.64
7.3.190.0070.01116.43
7.3.180.0070.01516.61
7.3.170.0130.00416.38
7.3.160.0150.00516.55
7.3.130.0050.01214.79
7.3.120.0090.00414.83
7.3.110.0070.01114.61
7.3.100.0030.01015.01
7.3.90.0030.01314.81
7.3.80.0040.00614.79
7.3.70.0070.00514.81
7.3.60.0050.01114.81
7.3.50.0070.00814.74
7.3.40.0100.00314.68
7.3.30.0030.01014.48
7.3.20.0040.00516.56
7.3.10.0060.00616.59
7.3.00.0030.01016.57
7.2.330.0070.01416.75
7.2.320.0140.00416.83
7.2.310.0170.00016.67
7.2.300.0070.01016.64
7.2.290.0070.01116.47
7.2.260.0100.00715.04
7.2.250.0070.01114.99
7.2.240.0070.00715.02
7.2.230.0050.01215.11
7.2.220.0040.00714.87
7.2.210.0060.00715.11
7.2.200.0020.01115.16
7.2.190.0110.00315.18
7.2.180.0070.00814.86
7.2.170.0070.00715.15
7.2.160.0080.00715.07
7.2.150.0050.00517.05
7.2.140.0080.00616.94
7.2.130.0080.00916.68
7.2.120.0070.00716.79
7.2.110.0030.01116.79
7.2.100.0090.00516.82
7.2.90.0100.00417.08
7.2.80.0110.00816.97
7.2.70.0060.00616.95
7.2.60.0070.00716.98
7.2.50.0110.00916.72
7.2.40.0050.01117.00
7.2.30.0090.00716.85
7.2.20.0090.00816.85
7.2.10.0080.00816.81
7.2.00.0060.01017.50
7.1.330.0020.01215.58
7.1.320.0020.01415.75
7.1.310.0050.00815.68
7.1.300.0080.00515.79
7.1.290.0060.01015.87
7.1.280.0060.00815.60
7.1.270.0080.00715.69
7.1.260.0060.00815.73
7.1.250.0060.00715.66
7.1.240.0020.01015.72
7.1.230.0080.00615.81
7.1.220.0060.00415.78
7.1.210.0050.00815.66
7.1.200.0030.01115.77
7.1.190.0050.00715.67
7.1.180.0070.00615.65
7.1.170.0040.00615.79
7.1.160.0080.00315.65
7.1.150.0060.00615.62
7.1.140.0050.01015.76
7.1.130.0040.00615.65
7.1.120.0030.01015.93
7.1.110.0090.00615.88
7.1.100.0050.00616.65
7.1.90.0040.00715.81
7.1.80.0050.01015.79
7.1.70.0040.00916.24
7.1.60.0020.01517.02
7.1.50.0070.01116.08
7.1.40.0060.00215.77
7.1.30.0040.00615.49
7.1.20.0060.00815.87
7.1.10.0040.00715.72
7.1.00.0090.02717.92
7.0.330.0070.00515.29
7.0.320.0020.00815.32
7.0.310.0020.01015.12
7.0.300.0030.01015.39
7.0.290.0060.00315.38
7.0.280.0050.00915.56
7.0.270.0050.00515.28
7.0.260.0070.00515.44
7.0.250.0050.00515.58
7.0.240.0070.00515.45
7.0.230.0060.00615.24
7.0.220.0010.01115.45
7.0.210.0050.00615.44
7.0.200.0110.00615.18
7.0.190.0060.00915.47
7.0.180.0030.00715.35
7.0.170.0030.00615.47
7.0.160.0050.00815.45
7.0.150.0020.01115.47
7.0.140.0050.00515.47
7.0.130.0080.00515.47
7.0.120.0050.00715.37
7.0.110.0050.00815.50
7.0.100.0020.01215.48
7.0.90.0090.00415.38
7.0.80.0060.00515.45
7.0.70.0070.00315.35
7.0.60.0030.02217.04
7.0.50.0040.02616.20
7.0.40.0030.02015.73
7.0.30.0170.01615.69
7.0.20.0150.03015.70
7.0.10.0080.03215.71
7.0.00.0050.02015.72
5.6.400.0030.00814.51
5.6.390.0060.00614.43
5.6.380.0080.00714.20
5.6.370.0010.01214.42
5.6.360.0020.00814.41
5.6.350.0040.00714.21
5.6.340.0040.00814.33
5.6.330.0050.01014.59
5.6.320.0130.00314.48
5.6.310.0050.00914.53
5.6.300.0040.01114.38
5.6.290.0070.00814.63
5.6.280.0060.02616.66
5.6.270.0050.00914.52
5.6.260.0000.00914.26
5.6.250.0030.00714.21
5.6.240.0050.00814.25
5.6.230.0060.00814.50
5.6.220.0020.01414.32
5.6.210.0110.02816.60
5.6.200.0060.03315.62
5.6.190.0070.01916.35
5.6.180.0160.02316.38
5.6.170.0090.02116.60
5.6.160.0040.03116.48
5.6.150.0020.02515.64
5.6.140.0070.03115.71
5.6.130.0040.02015.54
5.6.120.0040.03716.68
5.6.110.0050.03316.60
5.6.100.0050.02616.57
5.6.90.0070.01716.50
5.6.80.0020.01916.43
5.6.70.0060.00914.18
5.6.60.0030.00814.17
5.6.50.0050.00614.10
5.6.40.0080.00514.41
5.6.30.0080.00614.40
5.6.20.0080.00714.52
5.6.10.0030.01014.30
5.6.00.0080.00414.44
5.5.380.0050.01014.16
5.5.370.0080.00714.42
5.5.360.0020.01214.29
5.5.350.1470.01716.22
5.5.340.0050.01615.62
5.5.330.0030.01916.39
5.5.320.0050.01916.41
5.5.310.0090.02116.40
5.5.300.0040.02115.75
5.5.290.0060.03015.66
5.5.280.0050.01916.59
5.5.270.0070.03116.53
5.5.260.0050.02116.36
5.5.250.0060.02916.59
5.5.240.0110.03116.29
5.5.230.0070.00814.29
5.5.220.0080.00614.18
5.5.210.0000.01114.30
5.5.200.0070.00714.39
5.5.190.0020.01114.40
5.5.180.0070.00514.19
5.5.170.0030.01014.42
5.5.160.0070.00514.19
5.5.150.0070.00714.21
5.5.140.0050.01014.43
5.5.130.0080.00514.27
5.5.120.0020.00914.23
5.5.110.0070.00514.34
5.5.100.0030.00814.25
5.5.90.0090.00514.09
5.5.80.0070.00614.40
5.5.70.0080.00414.00
5.5.60.0060.00414.24
5.5.50.0050.00714.22
5.5.40.0080.00514.20
5.5.30.0050.00914.40
5.5.20.0070.00714.31
5.5.10.0050.00714.31
5.5.00.0000.01214.37

preferences:
62.31 ms | 401 KiB | 5 Q