3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDomElement extends DOMElement {} $dom = new DOMDocument(); $dom->registerNodeClass('DOMElement','MyDomElement'); $node = $dom->createElement('test'); var_dump(get_class($node));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Oq4V
function name:  (null)
number of ops:  16
compiled vars:  !0 = $dom, !1 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'registerNodeClass'
          4        SEND_VAL_EX                                              'DOMElement'
          5        SEND_VAL_EX                                              'MyDomElement'
          6        DO_FCALL                                      0          
    6     7        INIT_METHOD_CALL                                         !0, 'createElement'
          8        SEND_VAL_EX                                              'test'
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                                   !1, $6
    7    11        INIT_FCALL                                               'var_dump'
         12        GET_CLASS                                        ~8      !1
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class MyDomElement: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.1 ms | 1394 KiB | 15 Q