3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement( '<catalogo> <server> <nome>ltw1319</nome> <convenzione>comprato</convenzione> <interoperabilita>Aggregato</interoperabilita> <url>http://ltw1319.web.cs.unibo.it/richieste</url> </server> <server> <nome>ltw1330</nome> <convenzione>comprato</convenzione> <interoperabilita>Aggregato</interoperabilita> <url>http://ltw1330.web.cs.unibo.it/richieste</url> </server> <server> <nome>ltw1336</nome> <convenzione>comprato</convenzione> <interoperabilita>Aggregato</interoperabilita> <url>http://ltw1336.web.cs.unibo.it/richieste</url> </server> <server> <nome>ltw1311</nome> <convenzione>Integrato</convenzione> <interoperabilita>Aggregato</interoperabilita> <url>http://ltw1311.web.cs.unibo.it/richieste</url> </server> </catalogo> '); $ulrscomprati = array(); $xml = simplexml_load_file('server.xml'); $item = $xml->server; $count=0; foreach($item as $dati){ $ur=$dati->url; if($ur != ""){ $ulrscomprati[$count]=$ur; } $count=$count+1; } echo $ulrscomprati[$count]; $result_from_server = json_encode($ulrscomprati,$data); echo $result_from_server;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 23
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/EFKlb
function name:  (null)
number of ops:  33
compiled vars:  !0 = $xml, !1 = $ulrscomprati, !2 = $item, !3 = $count, !4 = $dati, !5 = $ur, !6 = $result_from_server, !7 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $8      'SimpleXMLElement'
    4     1        SEND_VAL_EX                                              '%3Ccatalogo%3E%0A%09%3Cserver%3E%0A%09%09%3Cnome%3Eltw1319%3C%2Fnome%3E%0A%09%09%3Cconvenzione%3Ecomprato%3C%2Fconvenzione%3E%0A%09%09%3Cinteroperabilita%3EAggregato%3C%2Finteroperabilita%3E%0A%09%09%3Curl%3Ehttp%3A%2F%2Fltw1319.web.cs.unibo.it%2Frichieste%3C%2Furl%3E%0A%09%3C%2Fserver%3E%0A%09%3Cserver%3E%0A%09%09%3Cnome%3Eltw1330%3C%2Fnome%3E%0A%09%09%3Cconvenzione%3Ecomprato%3C%2Fconvenzione%3E%0A%09%09%3Cinteroperabilita%3EAggregato%3C%2Finteroperabilita%3E%0A%09%09%3Curl%3Ehttp%3A%2F%2Fltw1330.web.cs.unibo.it%2Frichieste%3C%2Furl%3E%0A%09%3C%2Fserver%3E%0A%09%3Cserver%3E%0A%09%09%3Cnome%3Eltw1336%3C%2Fnome%3E%0A%09%09%3Cconvenzione%3Ecomprato%3C%2Fconvenzione%3E%0A%09%09%3Cinteroperabilita%3EAggregato%3C%2Finteroperabilita%3E%0A%09%09%3Curl%3Ehttp%3A%2F%2Fltw1336.web.cs.unibo.it%2Frichieste%3C%2Furl%3E%0A%09%3C%2Fserver%3E%0A%09%3Cserver%3E%0A%09%09%3Cnome%3Eltw1311%3C%2Fnome%3E%0A%09%09%3Cconvenzione%3EIntegrato%3C%2Fconvenzione%3E%0A%09%09%3Cinteroperabilita%3EAggregato%3C%2Finteroperabilita%3E%0A%09%09%3Curl%3Ehttp%3A%2F%2Fltw1311.web.cs.unibo.it%2Frichieste%3C%2Furl%3E%0A%09%3C%2Fserver%3E%0A%3C%2Fcatalogo%3E%0A'
          2        DO_FCALL                                      0          
    3     3        ASSIGN                                                   !0, $8
   32     4        ASSIGN                                                   !1, <array>
   33     5        INIT_FCALL                                               'simplexml_load_file'
          6        SEND_VAL                                                 'server.xml'
          7        DO_ICALL                                         $12     
          8        ASSIGN                                                   !0, $12
   34     9        FETCH_OBJ_R                                      ~14     !0, 'server'
         10        ASSIGN                                                   !2, ~14
   35    11        ASSIGN                                                   !3, 0
   36    12      > FE_RESET_R                                       $17     !2, ->23
         13    > > FE_FETCH_R                                               $17, !4, ->23
   37    14    >   FETCH_OBJ_R                                      ~18     !4, 'url'
         15        ASSIGN                                                   !5, ~18
   38    16        IS_NOT_EQUAL                                             !5, ''
         17      > JMPZ                                                     ~20, ->20
   39    18    >   ASSIGN_DIM                                               !1, !3
         19        OP_DATA                                                  !5
   41    20    >   ADD                                              ~22     !3, 1
         21        ASSIGN                                                   !3, ~22
   36    22      > JMP                                                      ->13
         23    >   FE_FREE                                                  $17
   43    24        FETCH_DIM_R                                      ~24     !1, !3
         25        ECHO                                                     ~24
   44    26        INIT_FCALL                                               'json_encode'
         27        SEND_VAR                                                 !1
         28        SEND_VAR                                                 !7
         29        DO_ICALL                                         $25     
         30        ASSIGN                                                   !6, $25
   45    31        ECHO                                                     !6
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.11 ms | 1400 KiB | 17 Q