3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s2 = '<?xml version="1.0"?><!DOCTYPE kaboom [ <!ENTITY a "'.str_repeat('a', 1000).'"> ]> <kaboom>'.str_repeat('&a;', 1000).'</kaboom>'; $doc = new DOMDocument(); $doc->loadXML($s2); echo strlen($doc->lastChild->nodeValue);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iSAKj
function name:  (null)
number of ops:  24
compiled vars:  !0 = $s2, !1 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 1000
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      '%3C%3Fxml+version%3D%221.0%22%3F%3E%3C%21DOCTYPE+kaboom+%5B%0A++%3C%21ENTITY+a+%22', $2
          5        CONCAT                                           ~4      ~3, '%22%3E%0A%5D%3E%0A%3Ckaboom%3E'
    6     6        INIT_FCALL                                               'str_repeat'
          7        SEND_VAL                                                 '%26a%3B'
          8        SEND_VAL                                                 1000
          9        DO_ICALL                                         $5      
         10        CONCAT                                           ~6      ~4, $5
         11        CONCAT                                           ~7      ~6, '%3C%2Fkaboom%3E'
    3    12        ASSIGN                                                   !0, ~7
    8    13        NEW                                              $9      'DOMDocument'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !1, $9
    9    16        INIT_METHOD_CALL                                         !1, 'loadXML'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
   10    19        FETCH_OBJ_R                                      ~13     !1, 'lastChild'
         20        FETCH_OBJ_R                                      ~14     ~13, 'nodeValue'
         21        STRLEN                                           ~15     ~14
         22        ECHO                                                     ~15
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.34 ms | 1386 KiB | 15 Q