3v4l.org

run code in 500+ PHP versions simultaneously
<?php $t = '<!--?xml version="1.0" encoding="UTF-8"?--> <xsi:event xsi1:type="xsi:SubscriptionEvent" xmlns:xsi="http://schema.broadsoft.com/xsi" xmlns:xsi1="http://www.w3.org/2001/XMLSchema-instance"><xsi:eventid>4c350c8d-c83c-4965-a9f9-77df5984fbfc</xsi:eventid><xsi:sequencenumber>1</xsi:sequencenumber><xsi:userid>MPBX_298887675_EventSubscription@mpbx.sip.beeline.ru</xsi:userid><xsi:externalapplicationid>298887675_e39abe37f782bb263c5d7972a25f64b6</xsi:externalapplicationid><xsi:subscriptionid>e1891465-332c-4241-b7c8-ee92ffd05839</xsi:subscriptionid><xsi:httpcontact><xsi:uri>http://topnlab.ru/call/incall/5?vendorId=5&amp;token=3a48139a-156e-4345-ab05-78fee42ceef7&amp;agency_id=106058</xsi:uri></xsi:httpcontact><xsi:targetid>9223540039@mpbx.sip.beeline.ru</xsi:targetid><xsi:eventdata xsi1:type="xsi:CallReleasedEvent"><xsi:call><xsi:callid>callhalf-6539432807:0</xsi:callid><xsi:exttrackingid>94616370:2</xsi:exttrackingid><xsi:networkcallid>BW111726195231117-548427609@10.64.248.6</xsi:networkcallid><xsi:personality>Originator</xsi:personality><xsi:state>Released</xsi:state><xsi:releasingparty>localRelease</xsi:releasingparty><xsi:remoteparty><xsi:address countrycode="7">tel:+79197159426</xsi:address><xsi:calltype>Network</xsi:calltype></xsi:remoteparty><xsi:starttime>1511425046189</xsi:starttime><xsi:answertime>1511425057459</xsi:answertime><xsi:releasetime>1511425336465</xsi:releasetime><xsi:recorded><xsi:allowedrecordingcontrols>none</xsi:allowedrecordingcontrols></xsi:recorded></xsi:call></xsi:eventdata></xsi:event>'; $XMLReader = new XMLReader(); $XMLReader->xml($t); while($XMLReader->read()) { if ($XMLReader->nodeType == XMLReader::ELEMENT) { var_dump($XMLReader->name); } } die; if (!$filename) return array(); $this->reader = new XMLReader(); $this->reader->open($filename); // begin read XML while ($this->reader->read()) { if ($this->reader->name == 'store_categories') { // while not found end tag read blocks while (!($this->reader->name == 'store_categories' && $this->reader->nodeType == XMLReader::END_ELEMENT)) { $store_category = $this->parseBlock('store_category'); /* Do some code */ $this->reader->read(); } $this->reader->read(); } } die; var_dump(2 | 4 | 8);die; var_dump(decbin(1 << 0), 1 << 1, 1 << 2,1 << 3,1 << 4,1 << 5,1 << 6,1 << 7,1 << 8); die; function isFlagSet($mask, $flag) { return (($mask & $flag) == $flag); } function setFlag($mask, $flag, $value) { if($value) { $mask |= $flag; } else { $mask &= ~$flag; } return $mask; } var_dump(setFlag(4, 2, false)); die; var_dump( 16 << 0, 16 >> 0, sprintf('%064b', 1 | 4), sprintf('%064b', 1), sprintf('%064b', 2), sprintf('%064b', 4), sprintf('%064b', 6), sprintf('%064b', 8) ); die; var_dump($m = '100' | '001'); var_dump( decbin(2), decbin(4), decbin($m), 1 << 3 ); die;

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.5.60.0120.00617.19
8.5.50.0100.00517.09
8.5.30.0150.00818.03
8.5.20.0100.01019.65
8.5.10.0130.00617.21
8.5.00.0170.00720.46
8.4.210.0130.01121.66
8.4.180.0180.00520.12
8.4.170.0150.00824.18
8.4.160.0120.01124.28
8.4.150.0070.00517.13
8.4.140.0110.01218.14
8.4.130.0110.00918.04
8.4.120.0140.00720.58
8.4.110.0110.01122.68
8.4.100.0130.00918.11
8.4.90.0100.00318.05
8.4.80.0060.00318.22
8.4.70.0050.00418.00
8.4.60.0040.00519.09
8.4.50.0050.00319.94
8.4.40.0110.00018.23
8.4.30.0130.00618.14
8.4.20.0070.01319.54
8.4.10.0200.00019.67
8.3.300.0140.00821.13
8.3.290.0110.01021.15
8.3.280.0120.01018.77
8.3.270.0130.00716.81
8.3.260.0100.00917.21
8.3.250.0130.00718.98
8.3.240.0140.00716.95
8.3.230.0090.01117.00
8.3.220.0130.00617.45
8.3.210.0070.01017.02
8.3.200.0090.01016.88
8.3.190.0110.00619.17
8.3.180.0090.00916.96
8.3.170.0100.01016.91
8.3.160.0070.01117.04
8.3.150.0130.00717.75
8.3.140.0080.00017.25
8.3.130.0040.00418.80
8.3.120.0090.00020.80
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0100.01026.77
8.3.80.0090.00018.60
8.3.70.0160.00618.57
8.3.60.0210.00418.81
8.3.50.0090.00617.75
8.3.40.0140.00419.09
8.3.30.0150.00018.89
8.3.20.0030.00720.54
8.3.10.0050.00323.86
8.3.00.0000.00824.04
8.2.300.0120.00918.45
8.2.290.0070.00120.87
8.2.280.0080.01221.12
8.2.270.0130.00619.45
8.2.260.0030.00619.11
8.2.250.0080.00018.89
8.2.240.0070.00317.82
8.2.230.0090.01222.58
8.2.220.0000.01937.54
8.2.210.0150.00026.77
8.2.200.0040.00718.79
8.2.190.0070.00717.13
8.2.180.0130.00625.92
8.2.170.0070.00719.29
8.2.160.0100.00722.96
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0000.00821.07
8.2.120.0040.00426.35
8.2.110.0070.00321.25
8.2.100.0090.00318.41
8.2.90.0040.00419.61
8.2.80.0040.00417.97
8.2.70.0030.00618.00
8.2.60.0050.00318.30
8.2.50.0040.00418.59
8.2.40.0000.00821.00
8.2.30.0000.00821.32
8.2.20.0000.00818.39
8.2.10.0040.00418.38
8.2.00.0000.00718.47
8.1.340.0120.00822.14
8.1.330.0090.01118.77
8.1.320.0080.00816.51
8.1.310.0030.01516.94
8.1.300.0060.01016.51
8.1.290.0070.00330.84
8.1.280.0090.00625.92
8.1.270.0000.00922.60
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00722.92
8.1.230.0110.00020.73
8.1.220.0000.00818.16
8.1.210.0060.00318.77
8.1.200.0060.00317.73
8.1.190.0040.00417.73
8.1.180.0040.00418.10
8.1.170.0040.00419.07
8.1.160.0060.00419.27
8.1.150.0000.00820.57
8.1.140.0000.00919.50
8.1.130.0000.00719.42
8.1.120.0000.00717.86
8.1.110.0080.00017.73
8.1.100.0000.00817.83
8.1.90.0040.00417.81
8.1.80.0050.00417.69
8.1.70.0030.00317.96
8.1.60.0030.00617.99
8.1.50.0040.00417.95
8.1.40.0030.00517.95
8.1.30.0090.00017.98
8.1.20.0040.00418.02
8.1.10.0080.00018.02
8.1.00.0000.00818.00
8.0.300.0050.00318.77
8.0.290.0000.00817.13
8.0.280.0000.00818.81
8.0.270.0030.00517.51
8.0.260.0030.00318.79
8.0.250.0070.00017.32
8.0.240.0030.00317.34
8.0.230.0000.00817.33
8.0.220.0000.00717.39
8.0.210.0070.00017.15
8.0.200.0030.00317.31
8.0.190.0000.00817.34
8.0.180.0040.00417.35
8.0.170.0020.00517.15
8.0.160.0000.00917.18
8.0.150.0060.00617.04
8.0.140.0030.00617.23
8.0.130.0030.00313.67
8.0.120.0040.00417.38
8.0.110.0000.00817.41
8.0.100.0040.00417.33
8.0.90.0080.00017.12
8.0.80.0120.00317.30
8.0.70.0050.00317.17
8.0.60.0040.00417.39
8.0.50.0070.00017.38
8.0.30.0090.01017.51
8.0.20.0080.01217.49
8.0.10.0080.00017.51
8.0.00.0090.01817.35
7.4.330.0020.00215.55
7.4.320.0030.00317.02
7.4.300.0060.00017.00
7.4.290.0030.00516.94
7.4.280.0030.00716.89
7.4.270.0040.00416.89
7.4.260.0110.00016.82
7.4.250.0040.00416.85
7.4.240.0000.00716.97
7.4.230.0000.00716.93
7.4.220.0120.00617.04
7.4.210.0000.01616.99
7.4.200.0080.00017.00
7.4.160.0080.01116.83
7.4.150.0130.00617.40
7.4.140.0100.01117.86
7.4.130.0140.00716.95
7.4.120.0100.01016.83
7.4.110.0090.01216.97
7.4.100.0130.00416.88
7.4.90.0180.00016.81
7.4.80.0090.00919.39
7.4.70.0080.01216.91
7.4.60.0070.01016.76
7.4.50.0100.00617.05
7.4.40.0070.01416.60
7.4.30.0150.01016.72
7.4.00.0090.00915.30
7.3.330.0030.00313.51
7.3.320.0030.00313.66
7.3.310.0000.00716.79
7.3.300.0050.00316.71
7.3.290.0050.01216.64
7.3.280.0090.00916.67
7.3.270.0120.00917.40
7.3.260.0150.00616.70
7.3.250.0160.00816.68
7.3.240.0110.00816.73
7.3.230.0060.01616.79
7.3.210.0170.00316.93
7.3.200.0030.01416.79
7.3.190.0090.00916.61
7.3.180.0090.00916.70
7.3.170.0100.00716.97
7.3.160.0100.00616.77
7.2.330.0150.00817.11
7.2.320.0070.01016.77
7.2.310.0160.00616.96
7.2.300.0100.01416.63
7.2.290.0030.02217.12
7.2.60.0000.01417.06
7.1.200.0090.00316.21
7.1.110.0770.01016.27
7.1.100.0770.01316.15
7.1.90.0180.01115.83
7.1.80.0450.00915.72
7.1.70.0320.00815.27
7.1.60.1210.00733.63
7.1.50.0210.01433.32
7.1.40.1980.02632.75
7.1.30.0610.01632.94
7.1.20.0350.01732.95
7.1.10.0750.00314.96
7.1.00.0040.01815.02
7.0.250.1080.00016.14
7.0.240.0800.00716.18
7.0.230.0070.01015.65
7.0.220.0110.00816.01
7.0.210.0360.01015.25
7.0.200.1480.00915.25
7.0.190.0880.01014.95
7.0.180.1640.00714.90
7.0.170.0040.01714.80
7.0.160.1160.00714.59
7.0.150.0770.00614.92
7.0.140.0080.01214.64
7.0.130.0750.00914.95
7.0.120.0070.01414.90
7.0.110.1740.00314.70
7.0.100.0940.01314.59
7.0.90.0970.00814.81
7.0.80.0900.01015.02
7.0.70.1180.00714.72
7.0.60.1000.01314.42
7.0.50.0100.00614.73
7.0.40.0360.00614.98
7.0.30.0910.01214.98
7.0.20.0970.01014.96
7.0.10.0070.01514.70
7.0.00.0750.01014.76

preferences:
99.96 ms | 1653 KiB | 5 Q