3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new DOMDocument('1.0', 'UTF-8'); $d->loadHTML('<div><span>test</span></div>'); $e = $d->documentElement->lastChild->lastChild; $e->parentNode->removeChild($e); var_dump($e);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ilW4f
function name:  (null)
number of ops:  20
compiled vars:  !0 = $d, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DOMDocument'
          1        SEND_VAL_EX                                              '1.0'
          2        SEND_VAL_EX                                              'UTF-8'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    5     5        INIT_METHOD_CALL                                         !0, 'loadHTML'
          6        SEND_VAL_EX                                              '%3Cdiv%3E%3Cspan%3Etest%3C%2Fspan%3E%3C%2Fdiv%3E'
          7        DO_FCALL                                      0          
    7     8        FETCH_OBJ_R                                      ~6      !0, 'documentElement'
          9        FETCH_OBJ_R                                      ~7      ~6, 'lastChild'
         10        FETCH_OBJ_R                                      ~8      ~7, 'lastChild'
         11        ASSIGN                                                   !1, ~8
    9    12        FETCH_OBJ_R                                      ~10     !1, 'parentNode'
         13        INIT_METHOD_CALL                                         ~10, 'removeChild'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
   11    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.92 ms | 1395 KiB | 15 Q