3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version='1.0' standalone='yes'?> <movies> <movie> <title>PHP: Behind the Parser</title> <characters> <character> <name>Ms. Coder</name> <actor>Onlivia Actora</actor> </character> <character> <name>Mr. Coder</name> <actor>El Act&#211;r</actor> </character> </characters> <plot> So, this language. It's like, a programming language. Or is it a scripting language? All is revealed in this thrilling horror spoof of a documentary. </plot> <great-lines1> <line>PHP solves all my web problems</line> </great-lines1> <great-lines2> <line>PHP solves all my web problems</line> <![CDATA[always be testing!]]> </great-lines2> <great-lines3> PHP solves all my web problems <![CDATA[always be testing!]]> </great-lines2> <rating type="thumbs">7</rating> <rating type="stars">5</rating> </movie> </movies> XML; $sml = new SimpleXMLElement ($xml); $result1 = $sml->xpath('/movies/movie/great-lines1'); $result2 = $sml->xpath('/movies/movie/great-lines2'); $result3 = $sml->xpath('/movies/movie/great-lines3'); var_dump($result1); var_dump($result2); var_dump($result3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0ILqX
function name:  (null)
number of ops:  27
compiled vars:  !0 = $xml, !1 = $sml, !2 = $result1, !3 = $result2, !4 = $result3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%271.0%27+standalone%3D%27yes%27%3F%3E%0A%3Cmovies%3E%0A+%3Cmovie%3E%0A++%3Ctitle%3EPHP%3A+Behind+the+Parser%3C%2Ftitle%3E%0A++%3Ccharacters%3E%0A+++%3Ccharacter%3E%0A++++%3Cname%3EMs.+Coder%3C%2Fname%3E%0A++++%3Cactor%3EOnlivia+Actora%3C%2Factor%3E%0A+++%3C%2Fcharacter%3E%0A+++%3Ccharacter%3E%0A++++%3Cname%3EMr.+Coder%3C%2Fname%3E%0A++++%3Cactor%3EEl+Act%26%23211%3Br%3C%2Factor%3E%0A+++%3C%2Fcharacter%3E%0A++%3C%2Fcharacters%3E%0A++%3Cplot%3E%0A+++So%2C+this+language.+It%27s+like%2C+a+programming+language.+Or+is+it+a%0A+++scripting+language%3F+All+is+revealed+in+this+thrilling+horror+spoof%0A+++of+a+documentary.%0A++%3C%2Fplot%3E%0A++%3Cgreat-lines1%3E%0A+++%3Cline%3EPHP+solves+all+my+web+problems%3C%2Fline%3E%0A++%3C%2Fgreat-lines1%3E%0A++%3Cgreat-lines2%3E%0A+++%3Cline%3EPHP+solves+all+my+web+problems%3C%2Fline%3E%0A+++%3C%21%5BCDATA%5Balways+be+testing%21%5D%5D%3E%0A++%3C%2Fgreat-lines2%3E%0A++%3Cgreat-lines3%3E%0A+++PHP+solves+all+my+web+problems%0A+++%3C%21%5BCDATA%5Balways+be+testing%21%5D%5D%3E%0A++%3C%2Fgreat-lines2%3E%0A++%3Crating+type%3D%22thumbs%22%3E7%3C%2Frating%3E%0A++%3Crating+type%3D%22stars%22%3E5%3C%2Frating%3E%0A+%3C%2Fmovie%3E%0A%3C%2Fmovies%3E'
   42     1        NEW                                              $6      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $6
   44     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2Fmovies%2Fmovie%2Fgreat-lines1'
          7        DO_FCALL                                      0  $9      
          8        ASSIGN                                                   !2, $9
   45     9        INIT_METHOD_CALL                                         !1, 'xpath'
         10        SEND_VAL_EX                                              '%2Fmovies%2Fmovie%2Fgreat-lines2'
         11        DO_FCALL                                      0  $11     
         12        ASSIGN                                                   !3, $11
   46    13        INIT_METHOD_CALL                                         !1, 'xpath'
         14        SEND_VAL_EX                                              '%2Fmovies%2Fmovie%2Fgreat-lines3'
         15        DO_FCALL                                      0  $13     
         16        ASSIGN                                                   !4, $13
   48    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
   50    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                                 
   52    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.17 ms | 1396 KiB | 15 Q