3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Content Type: text/plain"); $xml = simplexml_load_file("https://upload.wikimedia.org/wikipedia/commons/c/c8/Municipalities_in_OG.svg"); foreach($xml->children() as $child) { if ($child->getName() == "text") { $matrix = $child->attributes(); $matrix = str_replace(array("matrix(1 0 0 1 ", ")"), "", $matrix); $matrix = explode(" ", $matrix); // here we go $stationName = trim(str_replace(array("%%", '’'), array('\n', "'"), $child), " "); $x = $matrix[0]; $y = $matrix[1]; // your business logic here // echo($stationName); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 44
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 44
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 43
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 43
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
filename:       /in/RX34r
function name:  (null)
number of ops:  46
compiled vars:  !0 = $xml, !1 = $child, !2 = $matrix, !3 = $stationName, !4 = $x, !5 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content+Type%3A+text%2Fplain'
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'simplexml_load_file'
          4        SEND_VAL                                                 'https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fc%2Fc8%2FMunicipalities_in_OG.svg'
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !0, $7
    5     7        INIT_METHOD_CALL                                         !0, 'children'
          8        DO_FCALL                                      0  $9      
          9      > FE_RESET_R                                       $10     $9, ->44
         10    > > FE_FETCH_R                                               $10, !1, ->44
    6    11    >   INIT_METHOD_CALL                                         !1, 'getName'
         12        DO_FCALL                                      0  $11     
         13        IS_EQUAL                                                 $11, 'text'
         14      > JMPZ                                                     ~12, ->43
    7    15    >   INIT_METHOD_CALL                                         !1, 'attributes'
         16        DO_FCALL                                      0  $13     
         17        ASSIGN                                                   !2, $13
    8    18        INIT_FCALL                                               'str_replace'
         19        SEND_VAL                                                 <array>
         20        SEND_VAL                                                 ''
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !2, $15
    9    24        INIT_FCALL                                               'explode'
         25        SEND_VAL                                                 '+'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $17     
         28        ASSIGN                                                   !2, $17
   12    29        INIT_FCALL                                               'trim'
         30        INIT_FCALL                                               'str_replace'
         31        SEND_VAL                                                 <array>
         32        SEND_VAL                                                 <array>
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $19     
         35        SEND_VAR                                                 $19
         36        SEND_VAL                                                 '+'
         37        DO_ICALL                                         $20     
         38        ASSIGN                                                   !3, $20
   13    39        FETCH_DIM_R                                      ~22     !2, 0
         40        ASSIGN                                                   !4, ~22
   14    41        FETCH_DIM_R                                      ~24     !2, 1
         42        ASSIGN                                                   !5, ~24
    5    43    > > JMP                                                      ->10
         44    >   FE_FREE                                                  $10
   18    45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.01 ms | 1400 KiB | 23 Q