3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlStr = "<LaunchBox> <Game> <Name>Violet</Name> <ReleaseYear>1985</ReleaseYear> <MaxPlayers>1</MaxPlayers> <Platform>ZiNc</Platform> </Game> <Game> <Name>Wishbringer</Name> <ReleaseYear>1985</ReleaseYear> <MaxPlayers>1</MaxPlayers> <Platform>ZiNc</Platform> </Game> <Platform> <Name>3DO Interactive Multiplayer</Name> <Emulated>true</Emulated> <ReleaseDate>1993-10-04T00:00:00-07:00</ReleaseDate> <Developer>The 3DO Company</Developer> </Platform> <Platform> <Name>Commodore Amiga</Name> <Emulated>true</Emulated> <ReleaseDate>1985-07-23T00:00:00-07:00</ReleaseDate> <Developer>Commodore International</Developer> </Platform> </LaunchBox>"; $xml = simplexml_load_string($xmlStr); $games = $xml->xpath('/LaunchBox/Game'); echo count($games).' games'.PHP_EOL; foreach ($games as $game) { print_r($game); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/bLLEi
function name:  (null)
number of ops:  21
compiled vars:  !0 = $xmlStr, !1 = $xml, !2 = $games, !3 = $game
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3CLaunchBox%3E%0A++%3CGame%3E%0A++++%3CName%3EViolet%3C%2FName%3E%0A++++%3CReleaseYear%3E1985%3C%2FReleaseYear%3E%0A++++%3CMaxPlayers%3E1%3C%2FMaxPlayers%3E%0A++++%3CPlatform%3EZiNc%3C%2FPlatform%3E%0A++%3C%2FGame%3E%0A++%3CGame%3E%0A++++%3CName%3EWishbringer%3C%2FName%3E%0A++++%3CReleaseYear%3E1985%3C%2FReleaseYear%3E%0A++++%3CMaxPlayers%3E1%3C%2FMaxPlayers%3E%0A++++%3CPlatform%3EZiNc%3C%2FPlatform%3E%0A++%3C%2FGame%3E%0A++%3CPlatform%3E%0A++++%3CName%3E3DO+Interactive+Multiplayer%3C%2FName%3E%0A++++%3CEmulated%3Etrue%3C%2FEmulated%3E%0A++++%3CReleaseDate%3E1993-10-04T00%3A00%3A00-07%3A00%3C%2FReleaseDate%3E%0A++++%3CDeveloper%3EThe+3DO+Company%3C%2FDeveloper%3E%0A++%3C%2FPlatform%3E%0A++%3CPlatform%3E%0A++++%3CName%3ECommodore+Amiga%3C%2FName%3E%0A++++%3CEmulated%3Etrue%3C%2FEmulated%3E%0A++++%3CReleaseDate%3E1985-07-23T00%3A00%3A00-07%3A00%3C%2FReleaseDate%3E%0A++++%3CDeveloper%3ECommodore+International%3C%2FDeveloper%3E%0A++%3C%2FPlatform%3E%0A%3C%2FLaunchBox%3E'
   28     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   30     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2FLaunchBox%2FGame'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
   32     9        COUNT                                            ~9      !2
         10        CONCAT                                           ~10     ~9, '+games'
         11        CONCAT                                           ~11     ~10, '%0A'
         12        ECHO                                                     ~11
   34    13      > FE_RESET_R                                       $12     !2, ->19
         14    > > FE_FETCH_R                                               $12, !3, ->19
   35    15    >   INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   34    18      > JMP                                                      ->14
         19    >   FE_FREE                                                  $12
   36    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.45 ms | 1000 KiB | 15 Q