3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <data> <versions> <version> <n>0.1.0</n> <changes>First Public Release</changes> <note>This is a Beta</note> </version> </versions> <servers> </servers> </data> XML; $serverIP = "192.168.0.1"; $serverPort = 81; $xml=simplexml_load_string($str); $main_server = $xml->servers->xpath('//server[@ip="' . $serverIP . '"][@port="' . $serverPort . '"]')[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2QS24
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str, !1 = $serverIP, !2 = $serverPort, !3 = $xml, !4 = $main_server
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdata%3E%0A++++%3Cversions%3E%0A++++++++%3Cversion%3E%0A%09%09%09%3Cn%3E0.1.0%3C%2Fn%3E%0A%09%09%09%3Cchanges%3EFirst+Public+Release%3C%2Fchanges%3E%0A%09%09%09%3Cnote%3EThis+is+a+Beta%3C%2Fnote%3E%0A%09%09%3C%2Fversion%3E%0A++++%3C%2Fversions%3E%0A++++%3Cservers%3E%0A++++%3C%2Fservers%3E%0A%3C%2Fdata%3E'
   16     1        ASSIGN                                                   !1, '192.168.0.1'
   17     2        ASSIGN                                                   !2, 81
   20     3        INIT_FCALL                                               'simplexml_load_string'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !3, $8
   21     7        FETCH_OBJ_R                                      ~10     !3, 'servers'
          8        INIT_METHOD_CALL                                         ~10, 'xpath'
          9        CONCAT                                           ~11     '%2F%2Fserver%5B%40ip%3D%22', !1
         10        CONCAT                                           ~12     ~11, '%22%5D%5B%40port%3D%22'
         11        CONCAT                                           ~13     ~12, !2
         12        CONCAT                                           ~14     ~13, '%22%5D'
         13        SEND_VAL_EX                                              ~14
         14        DO_FCALL                                      0  $15     
         15        FETCH_DIM_R                                      ~16     $15, 0
         16        ASSIGN                                                   !4, ~16
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.86 ms | 1395 KiB | 15 Q