3v4l.org

run code in 500+ 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 . "\n"; echo $xml->first_string2 . "\n"; echo $xml->second_string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X14NK
function name:  (null)
number of ops:  29
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        CONCAT                                               ~11     ~10, '%0A'
         22        ECHO                                                         ~11
    9    23        FETCH_OBJ_R                                          ~12     !1, 'first_string2'
         24        CONCAT                                               ~13     ~12, '%0A'
         25        ECHO                                                         ~13
   10    26        FETCH_OBJ_R                                          ~14     !1, 'second_string'
         27        ECHO                                                         ~14
         28      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.16 ms | 2809 KiB | 14 Q