3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str=<<<XML <ledger> <data> <login_id>TamilNamaAtha5</login_id> <mode>P</mode> <pur_id>TIS-4-Jun-04-14</pur_id> <p_name>1 + 3 CAMERA CABLE - 3+1 CAMERA CABLE - ENJAY ULTRAMINI PC (ULX)</p_name> <rate>200.00</rate> <qty>1</qty> <dis>0.00</dis> <tax>0.00</tax> <round_off>0.00</round_off> <cst_tax>0.00</cst_tax> <total>200.00</total> <time>1402053126</time> </data> <data> <login_id>TamilNamaAtha5</login_id> <mode>PR</mode> <pur_id>2</pur_id> <p_name>1 + 3 CAMERA CABLE - 3+1 CAMERA CABLE - ENJAY ULTRAMINI PC (ULX)~12MM INDOOR VARIABLE LENCE - RAYSHARP -12MM VF LENCE - RAYSHARP~1 + 3 CAMERA CABLE - 3+1 CAMERA CABLE - EVERFOCUS</p_name> <rate>200.00~5000.00~500.00</rate> <qty>1~1~1</qty> <return_type>1~2~3</return_type> <round_off>0</round_off> <freight>2.00</freight> <cst_tax/> <total>5702</total> <time>1402141297</time> </data> <data> <login_id>TamilNamaAtha5</login_id> <mode>PCG</mode> <tab_id>1</tab_id> <company>blazon</company> <bill_id>0~4~7~12~5</bill_id> <amt>1000~200~50~101~149</amt> <module>O~L~V~V~L</module> <total>1500</total> <nar/> <time>1402425000</time> </data> <data> <login_id>TamilNamaAtha5</login_id> <mode>PCHQG</mode> <tab_id>1</tab_id> <company>blazon</company> <chq_date>1402425000</chq_date> <chq_no>ssds11</chq_no> <bank_name>sbi</bank_name> <dep_bank_name>SBI</dep_bank_name> <coll_date>1402425000</coll_date> <bill_id>5</bill_id> <amt>51</amt> <module>L</module> <total>51</total> <nar/> <time/> </data> <data> <login_id>TamilNamaAtha5</login_id> <mode>OP</mode> <company>blazon</company> <type>Cr</type> <total>1000.00</total> </data> <data> <login_id>TamilNamaAtha5</login_id> <company>blazon</company> <mode>V</mode> <pur_id>EF3</pur_id> <v_type>2</v_type> <v_name>TOM</v_name> <by_or_to>by</by_or_to> <tab_id>7</tab_id> <v_mode>CASH</v_mode> <total>50.00</total> <ref_no>3</ref_no> <nar>receipt cash for vendor</nar> <v_date>1402252200</v_date> <time>1402551037</time> </data> <data> <login_id>TamilNamaAtha5</login_id> <company>blazon</company> <mode>V</mode> <pur_id>EF8</pur_id> <v_type>4</v_type> <v_name>TOM</v_name> <by_or_to>by</by_or_to> <tab_id>12</tab_id> <total>101.00</total> <ref_no>7</ref_no> <nar>Cr - Tom to Dr - Customer</nar> <v_date>1402252200</v_date> <time>1402551046</time> </data> <data> <login_id>TamilCoimThud4</login_id> <mode>OP</mode> <company>Jerry-Die</company> <type>Dr</type> <total>1000.00</total> </data> <data> <login_id>TamilCoimThud4</login_id> <company>Jerry-Die</company> <mode>V</mode> <pur_id>EF2</pur_id> <tab_id>7</tab_id> <v_type>1</v_type> <v_name>TOM</v_name> <by_or_to>by</by_or_to> <v_mode>CASH</v_mode> <total>200.00</total> <ref_no>2</ref_no> <nar>payment cash to vendor</nar> <v_date>1402511400</v_date> <time>1402552205</time> </data> <data> <login_id>TamilCoimThud4</login_id> <company>Jerry-Die</company> <mode>V</mode> <pur_id>EF3</pur_id> <tab_id>8</tab_id> <v_type>4</v_type> <v_name>TOM</v_name> <by_or_to>by</by_or_to> <total>100.00</total> <ref_no>3</ref_no> <nar>Tom Cr - Customer Dr</nar> <v_date>1402511400</v_date> <time>1402552260</time> </data> <data> <login_id>TamilCoimThud4</login_id> <mode>V</mode> <pur_id>EF4</pur_id> <tab_id>9</tab_id> <v_type>4</v_type> <v_name>TOM</v_name> <by_or_to>to</by_or_to> <total>300.00</total> <ref_no>4</ref_no> <nar>Customer Cr - Tom Dr</nar> <v_date>1402511400</v_date> <time>1402552294</time> </data> <data> <login_id>TamilNamaAtha5</login_id> <company>blazon</company> <mode>V</mode> <pur_id>EF10</pur_id> <tab_id>25</tab_id> <v_type>2</v_type> <v_name>TOM</v_name> <by_or_to>by</by_or_to> <v_mode>CASH</v_mode> <total>1.00</total> <ref_no>2</ref_no> <nar>sdsd</nar> <v_date>1402511400</v_date> <time>1402565640</time> </data> <data> <login_id>TamilNamaAtha5</login_id> <company>blazon</company> <mode>V</mode> <pur_id>EF11</pur_id> <tab_id>26</tab_id> <v_type>2</v_type> <v_name>TOM</v_name> <by_or_to>by</by_or_to> <v_mode>CASH</v_mode> <total>10.00</total> <ref_no>22</ref_no> <nar>sasd</nar> <v_date>1402511400</v_date> <time>1402565964</time> </data> <data> <login_id>TamilNamaAtha5</login_id> <company>blazon</company> <mode>P</mode> <pur_id>TIS-5-Jun-11-14</pur_id> <p_name>1 + 3 CAMERA CABLE - 3+1 CAMERA CABLE - ENJAY ULTRAMINI PC (ULX)</p_name> <rate>200.00</rate> <qty>1</qty> <dis>0.00</dis> <tax>0.00</tax> <round_off>0.00</round_off> <cst_tax>0.00</cst_tax> <total>200.00</total> <time>1402511400</time> </data> </ledger> XML; $xml=simplexml_load_string($str); $result=$xml->xpath("/ledger/data[login_id='TamilNamaAtha5' and time < 1402514000 and mode='P']"); print_r($result);
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => SimpleXMLElement Object ( [login_id] => TamilNamaAtha5 [mode] => P [pur_id] => TIS-4-Jun-04-14 [p_name] => 1 + 3 CAMERA CABLE - 3+1 CAMERA CABLE - ENJAY ULTRAMINI PC (ULX) [rate] => 200.00 [qty] => 1 [dis] => 0.00 [tax] => 0.00 [round_off] => 0.00 [cst_tax] => 0.00 [total] => 200.00 [time] => 1402053126 ) [1] => SimpleXMLElement Object ( [login_id] => TamilNamaAtha5 [company] => blazon [mode] => P [pur_id] => TIS-5-Jun-11-14 [p_name] => 1 + 3 CAMERA CABLE - 3+1 CAMERA CABLE - ENJAY ULTRAMINI PC (ULX) [rate] => 200.00 [qty] => 1 [dis] => 0.00 [tax] => 0.00 [round_off] => 0.00 [cst_tax] => 0.00 [total] => 200.00 [time] => 1402511400 ) )
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/glC3N on line 200
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/glC3N on line 200
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: simplexml_load_string() in /in/glC3N on line 201
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/glC3N on line 200