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;lt;"); $xml->addChild("second_string",htmlentities("this is &lt;mystring&gt; &euro; &gt; $")); echo $xml->first_string . $xml->second_string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iLESJ
function name:  (null)
number of ops:  21
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%3Blt%3B'
          8        DO_FCALL                                      0          
    6     9        INIT_METHOD_CALL                                         !1, 'addChild'
         10        SEND_VAL_EX                                              'second_string'
         11        INIT_FCALL                                               'htmlentities'
         12        SEND_VAL                                                 'this+is+%26lt%3Bmystring%26gt%3B+%26euro%3B+%26gt%3B+%24'
         13        DO_ICALL                                         $7      
         14        SEND_VAR_NO_REF_EX                                       $7
         15        DO_FCALL                                      0          
    7    16        FETCH_OBJ_R                                      ~9      !1, 'first_string'
         17        FETCH_OBJ_R                                      ~10     !1, 'second_string'
         18        CONCAT                                           ~11     ~9, ~10
         19        ECHO                                                     ~11
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.79 ms | 1395 KiB | 15 Q