3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<'TEXT' Български Català Čeština Deutsch 한국어 Հայերեն മലയാളം 中文 TEXT; $encodings = array( 'UTF-8', 'ASCII', 'ISO-8859-1' ); foreach ($encodings as $encoding) { $dom = new DOMDocument('1.0', $encoding); $dom ->appendChild($dom->createElement('foo')) ->appendChild($dom->createTextNode($text)); var_dump($dom->saveXml()); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 27
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/tPLla
function name:  (null)
number of ops:  29
compiled vars:  !0 = $text, !1 = $encodings, !2 = $encoding, !3 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%D0%91%D1%8A%D0%BB%D0%B3%D0%B0%D1%80%D1%81%D0%BA%D0%B8+Catal%C3%A0+%C4%8Ce%C5%A1tina+Deutsch+%ED%95%9C%EA%B5%AD%EC%96%B4+%D5%80%D5%A1%D5%B5%D5%A5%D6%80%D5%A5%D5%B6+%E0%B4%AE%E0%B4%B2%E0%B4%AF%E0%B4%BE%E0%B4%B3%E0%B4%82+%E4%B8%AD%E6%96%87'
    7     1        ASSIGN                                                   !1, <array>
   11     2      > FE_RESET_R                                       $6      !1, ->27
          3    > > FE_FETCH_R                                               $6, !2, ->27
   12     4    >   NEW                                              $7      'DOMDocument'
          5        SEND_VAL_EX                                              '1.0'
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !3, $7
   14     9        INIT_METHOD_CALL                                         !3, 'appendChild'
         10        INIT_METHOD_CALL                                         !3, 'createElement'
         11        SEND_VAL_EX                                              'foo'
         12        DO_FCALL                                      0  $10     
         13        SEND_VAR_NO_REF_EX                                       $10
         14        DO_FCALL                                      0  $11     
   15    15        INIT_METHOD_CALL                                         $11, 'appendChild'
         16        INIT_METHOD_CALL                                         !3, 'createTextNode'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $12     
         19        SEND_VAR_NO_REF_EX                                       $12
         20        DO_FCALL                                      0          
   17    21        INIT_FCALL                                               'var_dump'
         22        INIT_METHOD_CALL                                         !3, 'saveXml'
         23        DO_FCALL                                      0  $14     
         24        SEND_VAR                                                 $14
         25        DO_ICALL                                                 
   11    26      > JMP                                                      ->3
         27    >   FE_FREE                                                  $6
   18    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.53 ms | 1396 KiB | 15 Q