3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Page { private $title; private $description; private $body; public function __construct($title = '') { if (!empty($title)) { $this->title = $title; } else { $this->title = "TITLE"; } } public function description($description) { $this->description = $description; } public function body($body) { $this->body = $body; } public function display($content = '') { $html = ''; $html .= '<html>\n'; $html .= '<head>\n'; $html .= '<title>'.$this->title.'</title>\n<body'; if(!empty($this->body)) $html .= ' '. $this->body; $html .= '>\n'; $html .= trim($content); $html .= '</body?\n'; $html .= '</html>'; } } $myPage = new Page('test'); $myPage->display("<div>HELLO</div>"); ?>

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.0120.00918.53
8.3.50.0060.01022.11
8.3.40.0070.00718.86
8.3.30.0070.00719.10
8.3.20.0060.00320.39
8.3.10.0080.00023.66
8.3.00.0040.00419.26
8.2.180.0070.01418.41
8.2.170.0120.00322.96
8.2.160.0070.00720.52
8.2.150.0000.00824.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0050.00319.77
8.2.110.0030.00622.25
8.2.100.0040.00817.63
8.2.90.0040.00419.18
8.2.80.0040.00417.97
8.2.70.0030.00917.75
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0030.00618.09
8.2.30.0000.01118.15
8.2.20.0000.00817.77
8.2.10.0050.00218.06
8.2.00.0080.00017.85
8.1.280.0170.00325.92
8.1.270.0030.00719.01
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00023.83
8.1.230.0110.00019.16
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.36
8.1.180.0030.00618.10
8.1.170.0030.00620.43
8.1.160.0040.00422.04
8.1.150.0030.00518.87
8.1.140.0040.00417.47
8.1.130.0000.00717.77
8.1.120.0000.00717.48
8.1.110.0000.00717.53
8.1.100.0030.00317.40
8.1.90.0080.00017.42
8.1.80.0050.00217.54
8.1.70.0000.00717.43
8.1.60.0040.00417.51
8.1.50.0000.00917.58
8.1.40.0050.00217.50
8.1.30.0000.00817.70
8.1.20.0040.00417.51
8.1.10.0040.00417.64
8.1.00.0000.00717.51
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.58
8.0.270.0000.00717.20
8.0.260.0060.00017.20
8.0.250.0030.00316.97
8.0.240.0070.00017.05
8.0.230.0000.00716.95
8.0.220.0030.00316.81
8.0.210.0070.00016.82
8.0.200.0000.00717.02
8.0.190.0040.00416.98
8.0.180.0070.00016.93
8.0.170.0040.00416.91
8.0.160.0040.00416.83
8.0.150.0040.00716.81
8.0.140.0000.00716.78
8.0.130.0030.00313.36
8.0.120.0080.00016.93
8.0.110.0000.00816.93
8.0.100.0000.00816.70
8.0.90.0040.00416.82
8.0.80.0120.00616.92
8.0.70.0000.00716.96
8.0.60.0040.00416.97
8.0.50.0040.00416.75
8.0.30.0150.00716.91
8.0.20.0120.00817.40
8.0.10.0040.00416.90
8.0.00.0060.01116.92
7.4.330.0000.00515.05
7.4.320.0060.00016.56
7.4.300.0070.00016.64
7.4.290.0030.00316.67
7.4.280.0040.00416.51
7.4.270.0030.00316.47
7.4.260.0070.00016.41
7.4.250.0030.00416.39
7.4.240.0000.00716.50
7.4.230.0070.00016.56
7.4.220.0120.01216.58
7.4.210.0070.00716.57
7.4.200.0030.00316.63
7.4.160.0050.01416.53
7.4.150.0140.01017.40
7.4.140.0070.01117.86
7.4.130.0100.01016.62
7.4.120.0120.00516.69
7.4.110.0150.00316.66
7.4.100.0100.01116.44
7.4.90.0140.00316.56
7.4.80.0100.00719.39
7.4.70.0160.00316.49
7.4.60.0100.00616.75
7.4.50.0030.00616.65
7.4.40.0060.01016.52
7.4.30.0070.01516.46
7.4.00.0070.00714.83
7.3.330.0060.00013.14
7.3.320.0030.00313.18
7.3.310.0000.00716.17
7.3.300.0020.00516.14
7.3.290.0070.00816.27
7.3.280.0080.00716.32
7.3.270.0150.00317.40
7.3.260.0000.01716.40
7.3.250.0120.00716.49
7.3.240.0070.01116.58
7.3.230.0150.00616.55
7.3.210.0070.00716.18
7.3.200.0140.00719.39
7.3.190.0110.00716.56
7.3.180.0120.00616.68
7.3.170.0090.00916.52
7.3.160.0140.00716.58
7.2.330.0060.01216.72
7.2.320.0150.00316.81
7.2.310.0090.01416.40
7.2.300.0060.01116.40
7.2.290.0030.01316.56
7.2.80.0070.00316.75
7.2.00.0050.00519.61
7.1.200.0110.00415.76
7.1.100.0040.00817.98
7.1.70.0000.01316.93
7.1.60.0110.01419.32
7.1.50.0130.01016.75
7.1.00.0100.07022.40
7.0.200.0030.00616.59
7.0.140.0070.06722.16
7.0.60.0200.05719.92
7.0.50.0130.07717.97
7.0.40.0130.07020.04
7.0.30.0330.07020.06
7.0.20.0200.04320.24
7.0.10.0100.05020.07
7.0.00.0070.09020.14
5.6.280.0030.07321.13
5.6.210.0070.05720.75
5.6.200.0030.07318.16
5.6.190.0030.07320.61
5.6.180.0270.07720.57
5.6.170.0300.03020.47
5.6.160.0130.07020.54
5.6.150.0000.04318.21
5.6.140.0070.03718.21
5.6.130.0100.05018.14
5.6.120.0100.08721.06
5.6.110.0000.04320.90
5.6.100.0000.07720.96
5.6.90.0070.06721.04
5.6.80.0170.07020.37
5.5.350.4130.04320.43
5.5.340.0030.04017.95
5.5.330.0130.07720.57
5.5.320.0600.07020.35
5.5.310.0200.04020.34
5.5.300.0030.05317.94
5.5.290.0070.05718.02
5.5.280.0030.04320.69
5.5.270.0070.03720.75
5.5.260.0170.06320.87
5.5.250.0070.06020.72
5.5.240.0130.05720.27
5.4.450.0100.06319.42
5.4.440.0130.05719.41
5.4.430.0100.06719.30
5.4.420.0070.08319.56
5.4.410.0300.03019.07
5.4.400.0100.04318.98
5.4.390.0070.07319.16
5.4.380.0170.04018.86
5.4.370.0100.07719.13
5.4.360.0130.07718.95
5.4.350.0130.04319.21
5.4.340.0200.04019.00
5.4.320.0100.03718.99
5.4.310.0100.03718.87
5.4.300.0130.06019.14
5.4.290.0130.03319.07
5.4.280.0100.03719.31
5.4.270.0030.04019.20
5.4.260.0230.03319.08
5.4.250.0070.05018.95
5.4.240.0100.06319.17
5.4.230.0170.03319.07
5.4.220.0130.06719.30
5.4.210.0070.05019.08
5.4.200.0130.04018.83
5.4.190.0100.03718.97
5.4.180.0230.02719.18
5.4.170.0070.04019.09
5.4.160.0100.03719.04
5.4.150.0100.03319.12
5.4.140.0070.03716.37
5.4.130.0200.06316.28
5.4.120.0100.04016.33
5.4.110.0070.03716.29
5.4.100.0130.07016.51
5.4.90.0230.03716.47
5.4.80.0130.06716.27
5.4.70.0130.06716.44
5.4.60.0130.03716.54
5.4.50.0130.05716.39
5.4.40.0130.07016.51
5.4.30.0130.04016.48
5.4.20.0100.04716.43
5.4.10.0130.07316.53
5.4.00.0370.03315.77
5.3.290.0130.06314.64
5.3.280.0130.04314.68
5.3.270.0130.04314.84
5.3.260.0100.06714.84
5.3.250.0100.06714.62
5.3.240.0030.05014.76
5.3.230.0100.05314.58
5.3.220.0070.07714.47
5.3.210.0030.05014.48
5.3.200.0030.06014.69
5.3.190.0100.03714.66
5.3.180.0100.07314.72
5.3.170.0070.03714.69
5.3.160.0170.04714.67
5.3.150.0170.05714.47
5.3.140.0000.05314.57
5.3.130.0100.04714.52
5.3.120.0100.04314.56
5.3.110.0100.06314.55
5.3.100.0100.03714.20
5.3.90.0100.04013.93
5.3.80.0000.04014.25
5.3.70.0130.07314.08
5.3.60.0070.06714.06
5.3.50.0070.04714.07
5.3.40.0100.07014.18
5.3.30.0070.04313.94
5.3.20.0100.04313.82
5.3.10.0100.04313.75
5.3.00.0070.04713.56
5.2.170.0000.03312.14
5.2.160.0030.04312.14
5.2.150.0000.06312.14
5.2.140.0070.03312.14
5.2.130.0100.04712.14
5.2.120.0100.03012.14
5.2.110.0100.03012.14
5.2.100.0030.03312.14
5.2.90.0030.03312.14
5.2.80.0070.03012.14
5.2.70.0000.05712.14
5.2.60.0130.05712.14
5.2.50.0000.03312.14
5.2.40.0000.03012.14
5.2.30.0000.05712.14
5.2.20.0100.04312.14
5.2.10.0030.06012.14
5.2.00.0070.05712.14
5.1.60.0000.02712.14
5.1.50.0000.02712.14
5.1.40.0000.02712.14
5.1.30.0070.02312.14
5.1.20.0000.02712.14
5.1.10.0070.05012.14
5.1.00.0000.03312.14
5.0.50.0000.05012.14
5.0.40.0000.02012.14
5.0.30.0030.02712.14
5.0.20.0000.02712.14
5.0.10.0030.02012.14
5.0.00.0070.06012.14
4.4.90.0070.02312.14
4.4.80.0000.02012.14
4.4.70.0000.03712.14
4.4.60.0070.02712.14
4.4.50.0030.01712.14
4.4.40.0030.03012.14
4.4.30.0070.01312.14
4.4.20.0000.03712.14
4.4.10.0030.03712.14
4.4.00.0000.04312.14
4.3.110.0000.03712.14
4.3.100.0000.02312.14
4.3.90.0030.02012.14
4.3.80.0030.03012.14
4.3.70.0000.03012.14
4.3.60.0030.03312.14
4.3.50.0000.02712.14
4.3.40.0000.03312.14
4.3.30.0030.02012.14
4.3.20.0000.01712.14
4.3.10.0000.02012.14
4.3.00.0000.02012.14

preferences:
46.67 ms | 401 KiB | 5 Q