3v4l.org

run code in 300+ PHP versions simultaneously
<?php version_compare(PHP_VERSION, '7.1', '<') && die; $xml = "<div><p>Мама мыла раму.</p></div>"; $doc = new DOMDocument(); $doc->encoding = 'UTF-8'; $doc->loadXML($xml); echo $doc->saveXML($doc->documentElement);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AiTkB
function name:  (null)
number of ops:  24
compiled vars:  !0 = $xml, !1 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '8.0.0'
          2        SEND_VAL                                                 '7.1'
          3        SEND_VAL                                                 '%3C'
          4        DO_ICALL                                         $2      
          5      > JMPZ_EX                                          ~3      $2, ->8
          6    > > EXIT                                                     
          7*       BOOL                                             ~3      <true>
    4     8    >   ASSIGN                                                   !0, '%3Cdiv%3E%3Cp%3E%D0%9C%D0%B0%D0%BC%D0%B0+%D0%BC%D1%8B%D0%BB%D0%B0+%D1%80%D0%B0%D0%BC%D1%83.%3C%2Fp%3E%3C%2Fdiv%3E'
    6     9        NEW                                              $5      'DOMDocument'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $5
    7    12        ASSIGN_OBJ                                               !1, 'encoding'
         13        OP_DATA                                                  'UTF-8'
    8    14        INIT_METHOD_CALL                                         !1, 'loadXML'
         15        SEND_VAR_EX                                              !0
         16        DO_FCALL                                      0          
    9    17        INIT_METHOD_CALL                                         !1, 'saveXML'
         18        CHECK_FUNC_ARG                                           
         19        FETCH_OBJ_FUNC_ARG                               $10     !1, 'documentElement'
         20        SEND_FUNC_ARG                                            $10
         21        DO_FCALL                                      0  $11     
         22        ECHO                                                     $11
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.63 ms | 1395 KiB | 15 Q