3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "<<<XML <?xml version='1.0'?> <document> <cmd>login</cmd> <login>Richard</login> </document> XML"; $xml = simplexml_load_string($string); print_r($xml); $login = $xml->login; print_r($login); $login = (string) $xml->login; print_r($login); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jV2if
function name:  (null)
number of ops:  20
compiled vars:  !0 = $string, !1 = $xml, !2 = $login
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3C%3CXML+%0A%3C%3Fxml+version%3D%271.0%27%3F%3E+%0A%3Cdocument%3E+%0A++++%3Ccmd%3Elogin%3C%2Fcmd%3E+%0A++++%3Clogin%3ERichard%3C%2Flogin%3E+%0A%3C%2Fdocument%3E+%0AXML'
   11     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   12     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   13     8        FETCH_OBJ_R                                      ~7      !1, 'login'
          9        ASSIGN                                                   !2, ~7
   14    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   15    13        FETCH_OBJ_R                                      ~10     !1, 'login'
         14        CAST                                          6  ~11     ~10
         15        ASSIGN                                                   !2, ~11
   16    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
   17    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.54 ms | 940 KiB | 18 Q