3v4l.org

run code in 300+ PHP versions simultaneously
<?php version_compare(PHP_VERSION, '7.1', '<') && die; $xml = "<div><p>Мама мыла раму.</p></div>"; $dom = new DOMDocument; $dom->loadHTML('<?xml encoding="utf-8" ?>' .$xml); print $dom->saveHTML();
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/3EGb6
function name:  (null)
number of ops:  20
compiled vars:  !0 = $xml, !1 = $dom
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>
    3     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'
    5     9        NEW                                              $5      'DOMDocument'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $5
    6    12        INIT_METHOD_CALL                                         !1, 'loadHTML'
         13        CONCAT                                           ~8      '%3C%3Fxml+encoding%3D%22utf-8%22+%3F%3E', !0
         14        SEND_VAL_EX                                              ~8
         15        DO_FCALL                                      0          
    7    16        INIT_METHOD_CALL                                         !1, 'saveHTML'
         17        DO_FCALL                                      0  $10     
         18        ECHO                                                     $10
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.39 ms | 1395 KiB | 15 Q