3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = <<<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-lines> <line>PHP solves all my web problems</line> </great-lines> <rating type="thumbs">7</rating> <rating type="stars">5</rating> </movie> </movies> XML; $movies = simplexml_load_string($xmlstr); var_dump($movies); foreach ($movies->movie->rating as $rating) { if ($rating["type"] == "stars") { var_dump((string) $rating); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 19
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/tLoMQ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $xmlstr, !1 = $movies, !2 = $rating
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     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-lines%3E%0A+++%3Cline%3EPHP+solves+all+my+web+problems%3C%2Fline%3E%0A++%3C%2Fgreat-lines%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'
   31     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   33     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   34     8        FETCH_OBJ_R                                      ~7      !1, 'movie'
          9        FETCH_OBJ_R                                      ~8      ~7, 'rating'
         10      > FE_RESET_R                                       $9      ~8, ->20
         11    > > FE_FETCH_R                                               $9, !2, ->20
   35    12    >   FETCH_DIM_R                                      ~10     !2, 'type'
         13        IS_EQUAL                                                 ~10, 'stars'
         14      > JMPZ                                                     ~11, ->19
   36    15    >   INIT_FCALL                                               'var_dump'
         16        CAST                                          6  ~12     !2
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                                 
   34    19    > > JMP                                                      ->11
         20    >   FE_FREE                                                  $9
   38    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.98 ms | 1401 KiB | 17 Q