3v4l.org

run code in 300+ PHP versions simultaneously
<?php $msg = 'There is an error'; $xmlstr = "<ERROR></ERROR>"; $sxml = new SimpleXMLElement($xmlstr); $sxmlErr = $sxml[0] = $msg; echo $sxml->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hX4G7
function name:  (null)
number of ops:  13
compiled vars:  !0 = $msg, !1 = $xmlstr, !2 = $sxml, !3 = $sxmlErr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'There+is+an+error'
    3     1        ASSIGN                                                   !1, '%3CERROR%3E%3C%2FERROR%3E'
    4     2        NEW                                              $6      'SimpleXMLElement'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $6
    5     6        ASSIGN_DIM                                       ~9      !2, 0
          7        OP_DATA                                                  !0
          8        ASSIGN                                                   !3, ~9
    6     9        INIT_METHOD_CALL                                         !2, 'asXML'
         10        DO_FCALL                                      0  $11     
         11        ECHO                                                     $11
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1393 KiB | 13 Q