3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<< HERE <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <book id="bk103"> <author>Corets, Eva</author> <title>Maeve Ascendant</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-11-17</publish_date> <description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description> </book> <book id="bk104"> <author>Corets, Eva</author> <title>Oberon's Legacy</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2001-03-10</publish_date> <description>In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant.</description> </book> <book id="bk105"> <author>Corets, Eva</author> <title>The Sundered Grail</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2001-09-10</publish_date> <description>The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy.</description> </book> <book id="bk106"> <author>Randall, Cynthia</author> <title>Lover Birds</title> <genre>Romance</genre> <price>4.95</price> <publish_date>2000-09-02</publish_date> <description>When Carla meets Paul at an ornithology conference, tempers fly as feathers get ruffled.</description> </book> <book id="bk107"> <author>Thurman, Paula</author> <title>Splish Splash</title> <genre>Romance</genre> <price>4.95</price> <publish_date>2000-11-02</publish_date> <description>A deep sea diver finds true love twenty thousand leagues beneath the sea.</description> </book> <book id="bk108"> <author>Knorr, Stefan</author> <title>Creepy Crawlies</title> <genre>Horror</genre> <price>4.95</price> <publish_date>2000-12-06</publish_date> <description>An anthology of horror stories about roaches, centipedes, scorpions and other insects.</description> </book> <book id="bk109"> <author>Kress, Peter</author> <title>Paradox Lost</title> <genre>Science Fiction</genre> <price>6.95</price> <publish_date>2000-11-02</publish_date> <description>After an inadvertant trip through a Heisenberg Uncertainty Device, James Salway discovers the problems of being quantum.</description> </book> <book id="bk110"> <author>O'Brien, Tim</author> <title>Microsoft .NET: The Programming Bible</title> <genre>Computer</genre> <price>36.95</price> <publish_date>2000-12-09</publish_date> <description>Microsoft's .NET initiative is explored in detail in this deep programmer's reference.</description> </book> <book id="bk111"> <author>O'Brien, Tim</author> <title>MSXML3: A Comprehensive Guide</title> <genre>Computer</genre> <price>36.95</price> <publish_date>2000-12-01</publish_date> <description>The Microsoft MSXML3 parser is covered in detail, with attention to XML DOM interfaces, XSLT processing, SAX and more.</description> </book> <book id="bk112"> <author>Galos, Mike</author> <title>Visual Studio 7: A Comprehensive Guide</title> <genre>Computer</genre> <price>49.95</price> <publish_date>2001-04-16</publish_date> <description>Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment.</description> </book> </catalog> HERE; $n = new SimpleXMLElement($xml); $r = $n->xpath('/catalog/book/author:'); var_dump($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hepVW
function name:  (null)
number of ops:  13
compiled vars:  !0 = $xml, !1 = $n, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ccatalog%3E%0A+++%3Cbook+id%3D%22bk101%22%3E%0A++++++%3Cauthor%3EGambardella%2C+Matthew%3C%2Fauthor%3E%0A++++++%3Ctitle%3EXML+Developer%27s+Guide%3C%2Ftitle%3E%0A++++++%3Cgenre%3EComputer%3C%2Fgenre%3E%0A++++++%3Cprice%3E44.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-10-01%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EAn+in-depth+look+at+creating+applications+%0A++++++with+XML.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk102%22%3E%0A++++++%3Cauthor%3ERalls%2C+Kim%3C%2Fauthor%3E%0A++++++%3Ctitle%3EMidnight+Rain%3C%2Ftitle%3E%0A++++++%3Cgenre%3EFantasy%3C%2Fgenre%3E%0A++++++%3Cprice%3E5.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-12-16%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EA+former+architect+battles+corporate+zombies%2C+%0A++++++an+evil+sorceress%2C+and+her+own+childhood+to+become+queen+%0A++++++of+the+world.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk103%22%3E%0A++++++%3Cauthor%3ECorets%2C+Eva%3C%2Fauthor%3E%0A++++++%3Ctitle%3EMaeve+Ascendant%3C%2Ftitle%3E%0A++++++%3Cgenre%3EFantasy%3C%2Fgenre%3E%0A++++++%3Cprice%3E5.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-11-17%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EAfter+the+collapse+of+a+nanotechnology+%0A++++++society+in+England%2C+the+young+survivors+lay+the+%0A++++++foundation+for+a+new+society.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk104%22%3E%0A++++++%3Cauthor%3ECorets%2C+Eva%3C%2Fauthor%3E%0A++++++%3Ctitle%3EOberon%27s+Legacy%3C%2Ftitle%3E%0A++++++%3Cgenre%3EFantasy%3C%2Fgenre%3E%0A++++++%3Cprice%3E5.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2001-03-10%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EIn+post-apocalypse+England%2C+the+mysterious+%0A++++++agent+known+only+as+Oberon+helps+to+create+a+new+life+%0A++++++for+the+inhabitants+of+London.+Sequel+to+Maeve+%0A++++++Ascendant.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk105%22%3E%0A++++++%3Cauthor%3ECorets%2C+Eva%3C%2Fauthor%3E%0A++++++%3Ctitle%3EThe+Sundered+Grail%3C%2Ftitle%3E%0A++++++%3Cgenre%3EFantasy%3C%2Fgenre%3E%0A++++++%3Cprice%3E5.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2001-09-10%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EThe+two+daughters+of+Maeve%2C+half-sisters%2C+%0A++++++battle+one+another+for+control+of+England.+Sequel+to+%0A++++++Oberon%27s+Legacy.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk106%22%3E%0A++++++%3Cauthor%3ERandall%2C+Cynthia%3C%2Fauthor%3E%0A++++++%3Ctitle%3ELover+Birds%3C%2Ftitle%3E%0A++++++%3Cgenre%3ERomance%3C%2Fgenre%3E%0A++++++%3Cprice%3E4.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-09-02%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EWhen+Carla+meets+Paul+at+an+ornithology+%0A++++++conference%2C+tempers+fly+as+feathers+get+ruffled.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk107%22%3E%0A++++++%3Cauthor%3EThurman%2C+Paula%3C%2Fauthor%3E%0A++++++%3Ctitle%3ESplish+Splash%3C%2Ftitle%3E%0A++++++%3Cgenre%3ERomance%3C%2Fgenre%3E%0A++++++%3Cprice%3E4.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-11-02%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EA+deep+sea+diver+finds+true+love+twenty+%0A++++++thousand+leagues+beneath+the+sea.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk108%22%3E%0A++++++%3Cauthor%3EKnorr%2C+Stefan%3C%2Fauthor%3E%0A++++++%3Ctitle%3ECreepy+Crawlies%3C%2Ftitle%3E%0A++++++%3Cgenre%3EHorror%3C%2Fgenre%3E%0A++++++%3Cprice%3E4.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-12-06%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EAn+anthology+of+horror+stories+about+roaches%2C%0A++++++centipedes%2C+scorpions++and+other+insects.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk109%22%3E%0A++++++%3Cauthor%3EKress%2C+Peter%3C%2Fauthor%3E%0A++++++%3Ctitle%3EParadox+Lost%3C%2Ftitle%3E%0A++++++%3Cgenre%3EScience+Fiction%3C%2Fgenre%3E%0A++++++%3Cprice%3E6.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-11-02%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EAfter+an+inadvertant+trip+through+a+Heisenberg%0A++++++Uncertainty+Device%2C+James+Salway+discovers+the+problems+%0A++++++of+being+quantum.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk110%22%3E%0A++++++%3Cauthor%3EO%27Brien%2C+Tim%3C%2Fauthor%3E%0A++++++%3Ctitle%3EMicrosoft+.NET%3A+The+Programming+Bible%3C%2Ftitle%3E%0A++++++%3Cgenre%3EComputer%3C%2Fgenre%3E%0A++++++%3Cprice%3E36.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-12-09%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EMicrosoft%27s+.NET+initiative+is+explored+in+%0A++++++detail+in+this+deep+programmer%27s+reference.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk111%22%3E%0A++++++%3Cauthor%3EO%27Brien%2C+Tim%3C%2Fauthor%3E%0A++++++%3Ctitle%3EMSXML3%3A+A+Comprehensive+Guide%3C%2Ftitle%3E%0A++++++%3Cgenre%3EComputer%3C%2Fgenre%3E%0A++++++%3Cprice%3E36.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2000-12-01%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EThe+Microsoft+MSXML3+parser+is+covered+in+%0A++++++detail%2C+with+attention+to+XML+DOM+interfaces%2C+XSLT+processing%2C+%0A++++++SAX+and+more.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A+++%3Cbook+id%3D%22bk112%22%3E%0A++++++%3Cauthor%3EGalos%2C+Mike%3C%2Fauthor%3E%0A++++++%3Ctitle%3EVisual+Studio+7%3A+A+Comprehensive+Guide%3C%2Ftitle%3E%0A++++++%3Cgenre%3EComputer%3C%2Fgenre%3E%0A++++++%3Cprice%3E49.95%3C%2Fprice%3E%0A++++++%3Cpublish_date%3E2001-04-16%3C%2Fpublish_date%3E%0A++++++%3Cdescription%3EMicrosoft+Visual+Studio+7+is+explored+in+depth%2C%0A++++++looking+at+how+Visual+Basic%2C+Visual+C%2B%2B%2C+C%23%2C+and+ASP%2B+are+%0A++++++integrated+into+a+comprehensive+development+%0A++++++environment.%3C%2Fdescription%3E%0A+++%3C%2Fbook%3E%0A%3C%2Fcatalog%3E'
  126     1        NEW                                              $4      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
  127     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2Fcatalog%2Fbook%2Fauthor%3A'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
  128     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.52 ms | 1392 KiB | 15 Q