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(); $item = $xml->server; $count=0; foreach($item as $dati){ $ur=$dati->url; if($ur != ""){ $ulrscomprati[$count]=$ur; } $count=$count+1; } $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 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 16
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/9falD
function name:  (null)
number of ops:  29
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        FETCH_OBJ_R                                      ~12     !0, 'server'
          6        ASSIGN                                                   !2, ~12
   34     7        ASSIGN                                                   !3, 0
   35     8      > FE_RESET_R                                       $15     !2, ->19
          9    > > FE_FETCH_R                                               $15, !4, ->19
   36    10    >   FETCH_OBJ_R                                      ~16     !4, 'url'
         11        ASSIGN                                                   !5, ~16
   37    12        IS_NOT_EQUAL                                             !5, ''
         13      > JMPZ                                                     ~18, ->16
   38    14    >   ASSIGN_DIM                                               !1, !3
         15        OP_DATA                                                  !5
   40    16    >   ADD                                              ~20     !3, 1
         17        ASSIGN                                                   !3, ~20
   35    18      > JMP                                                      ->9
         19    >   FE_FREE                                                  $15
   42    20        FETCH_DIM_R                                      ~22     !1, !3
         21        FREE                                                     ~22
   43    22        INIT_FCALL                                               'json_encode'
         23        SEND_VAR                                                 !1
         24        SEND_VAR                                                 !7
         25        DO_ICALL                                         $23     
         26        ASSIGN                                                   !6, $23
   44    27        ECHO                                                     !6
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.47 ms | 1400 KiB | 15 Q