3v4l.org

run code in 300+ PHP versions simultaneously
<span class="notranslate" onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><?php class MyException extends Exception { public function __construct($message, $code=0, Exception $previous = null) { parent::__construct($message,$code,$previous);</span> <?PHP类MyException扩展异常{公共职能__construct($消息,$代码= 0,异常元上= NULL){父:: __结构($消息,$代码,元上);</span> <span class="notranslate" onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left">} public function __toString() { return __CLASS__.</span> }公共职能__toString(){返回__CLASS__。</span> <span class="notranslate" onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left">":[{$this->code}]:{$this->message}\n";</span> “:[{$本>代码}]:{$此>消息} \ N”;</span> <span class="notranslate" onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left">} } throw new MyException("Foo");</span> }}抛出新MyException(“富”);</span>

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)
5.4.320.0060.03612.51
5.4.310.0080.04612.51
5.4.300.0070.03812.52
5.4.290.0060.04212.51
5.4.280.0140.03512.41
5.4.270.0050.03912.41
5.4.260.0080.03412.41
5.4.250.0070.04312.41
5.4.240.0060.03612.41
5.4.230.0080.03612.40
5.4.220.0050.04212.40
5.4.210.0070.04212.40
5.4.200.0070.03712.40
5.4.190.0060.03612.39
5.4.180.0070.03512.40
5.4.170.0050.03612.41
5.4.160.0040.03612.40
5.4.150.0040.03912.39
5.4.140.0080.03912.09
5.4.130.0080.04212.07
5.4.120.0070.03912.04
5.4.110.0070.03412.03
5.4.100.0080.04612.04
5.4.90.0060.04312.04
5.4.80.0060.03612.03
5.4.70.0090.04212.03
5.4.60.0110.03312.02
5.4.50.0070.03912.02
5.4.40.0060.04412.02
5.4.30.0050.04112.01
5.4.20.0070.03812.01
5.4.10.0080.04312.01
5.4.00.0040.03711.50
5.3.290.0050.04012.80
5.3.280.0060.04012.71
5.3.270.0060.04312.72
5.3.260.0090.03612.72
5.3.250.0040.03812.72
5.3.240.0060.04412.72
5.3.230.0080.04012.71
5.3.220.0080.04312.68
5.3.210.0080.03712.68
5.3.200.0080.04612.68
5.3.190.0060.03812.68
5.3.180.0050.04212.68
5.3.170.0060.03912.67
5.3.160.0070.03712.68
5.3.150.0070.03812.67
5.3.140.0080.03712.66
5.3.130.0080.04212.66
5.3.120.0080.04512.66
5.3.110.0080.04212.65
5.3.100.0100.03812.12
5.3.90.0070.04112.10
5.3.80.0080.03612.09
5.3.70.0060.03612.09
5.3.60.0050.03712.08
5.3.50.0050.03712.03
5.3.40.0060.04912.03
5.3.30.0080.04111.99
5.3.20.0050.03511.77
5.3.10.0070.04211.73
5.3.00.0080.04011.71
5.2.170.0040.0359.22
5.2.160.0030.0349.22
5.2.150.0060.0299.22
5.2.140.0030.0339.22
5.2.130.0050.0309.18
5.2.120.0080.0369.18
5.2.110.0100.0289.19
5.2.100.0070.0359.18
5.2.90.0070.0289.18
5.2.80.0040.0319.18
5.2.70.0050.0349.18
5.2.60.0080.0319.13
5.2.50.0040.0309.10
5.2.40.0080.0359.08
5.2.30.0040.0389.05
5.2.20.0070.0269.04
5.2.10.0060.0348.94
5.2.00.0020.0318.81
5.1.60.0030.0258.10
5.1.50.0030.0318.09
5.1.40.0080.0228.07
5.1.30.0050.0278.41
5.1.20.0060.0278.45
5.1.10.0050.0258.17
5.1.00.0020.0278.17
5.0.50.0020.0236.65
5.0.40.0030.0196.51
5.0.30.0070.0336.32
5.0.20.0070.0186.28
5.0.10.0050.0176.27
5.0.00.0050.0296.25
4.4.90.0070.0114.78
4.4.80.0020.0164.75
4.4.70.0000.0184.76
4.4.60.0030.0154.76
4.4.50.0010.0174.77
4.4.40.0020.0254.71
4.4.30.0030.0164.75
4.4.20.0030.0154.85
4.4.10.0060.0134.85
4.4.00.0010.0274.75
4.3.110.0030.0154.67
4.3.100.0030.0154.67
4.3.90.0040.0134.64
4.3.80.0030.0264.59
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0050.0214.54
4.3.30.0050.0133.30
4.3.20.0030.0153.28
4.3.10.0010.0163.23
4.3.00.0000.02014.30

preferences:
144.37 ms | 1394 KiB | 7 Q