3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml_header = "<?xml version='1.0' encoding='utf-8'?><xml/>"; $xml = new SimpleXMLElement($xml_header); $xml->addChild("first_string","this is &amp;lt;mystring&gt; &amp;euro; &amp;gt; $"); $xml->addChild("first_string2", "this is <mystring> &euro; > $"); $xml->addChild("second_string",htmlentities("this is <mystring> &euro; > $")); echo $xml->first_string . $xml->first_string2 . $xml->second_string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rhqkX
function name:  (null)
number of ops:  27
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      'SimpleXMLElement'
          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+%26amp%3Blt%3Bmystring%26gt%3B+%26amp%3Beuro%3B+%26amp%3Bgt%3B+%24'
          8        DO_FCALL                                      0          
    6     9        INIT_METHOD_CALL                                         !1, 'addChild'
         10        SEND_VAL_EX                                              'first_string2'
         11        SEND_VAL_EX                                              'this+is+%3Cmystring%3E+%26euro%3B+%3E+%24'
         12        DO_FCALL                                      0          
    7    13        INIT_METHOD_CALL                                         !1, 'addChild'
         14        SEND_VAL_EX                                              'second_string'
         15        INIT_FCALL                                               'htmlentities'
         16        SEND_VAL                                                 'this+is+%3Cmystring%3E+%26euro%3B+%3E+%24'
         17        DO_ICALL                                         $8      
         18        SEND_VAR_NO_REF_EX                                       $8
         19        DO_FCALL                                      0          
    8    20        FETCH_OBJ_R                                      ~10     !1, 'first_string'
         21        FETCH_OBJ_R                                      ~11     !1, 'first_string2'
         22        CONCAT                                           ~12     ~10, ~11
         23        FETCH_OBJ_R                                      ~13     !1, 'second_string'
         24        CONCAT                                           ~14     ~12, ~13
         25        ECHO                                                     ~14
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.49 ms | 1387 KiB | 15 Q