3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml_header = "<?xml version='1.0' encoding='utf-8'?><xml/>"; $xml = new SimpleXMLElement($xml_header); $xml->addChild("first_string","this is &lt;mystring&gt;"); $xml->addChild("second_string","this is <mystring>"); echo $xml->first_string . $xml->second_string;
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/1Fpds
function name:  (null)
number of ops:  18
compiled vars:  !0 = $xml_header, !1 = $xml
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%271.0%27+encoding%3D%27utf-8%27%3F%3E%3Cxml%2F%3E'
   4     1        NEW                                              $3      :-5
         2        SEND_VAR_EX                                              !0
         3        DO_FCALL                                      0          
         4        ASSIGN                                                   !1, $3
   5     5        INIT_METHOD_CALL                                         !1, 'addChild'
         6        SEND_VAL_EX                                              'first_string'
         7        SEND_VAL_EX                                              'this+is+%26lt%3Bmystring%26gt%3B'
         8        DO_FCALL                                      0          
   6     9        INIT_METHOD_CALL                                         !1, 'addChild'
        10        SEND_VAL_EX                                              'second_string'
        11        SEND_VAL_EX                                              'this+is+%3Cmystring%3E'
        12        DO_FCALL                                      0          
   7    13        FETCH_OBJ_R                                      $8      !1, 'first_string'
        14        FETCH_OBJ_R                                      $9      !1, 'second_string'
        15        CONCAT                                           ~10     $8, $9
        16        ECHO                                                     ~10
        17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0