3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace DOMWorks; use \DOMNode, \DOMDocument; class Node extends DOMNode { // methods... public function foo() { echo "Yay for foo!"; } } class Document extends DOMDocument { public function __construct($version = null, $encoding = null) { $this->registerNodeClass('DOMNode', '\\' . __NAMESPACE__ . '\\Node'); } // methods... } $doc = new Document; $doc->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YYslm
function name:  (null)
number of ops:  6
compiled vars:  !0 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'DOMWorks%5CDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class DOMWorks\Node:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YYslm
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'Yay+for+foo%21'
   14     1      > RETURN                                                   null

End of function foo

End of class DOMWorks\Node.

Class DOMWorks\Document:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YYslm
function name:  __construct
number of ops:  7
compiled vars:  !0 = $version, !1 = $encoding
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
   21     2        INIT_METHOD_CALL                                         'registerNodeClass'
          3        SEND_VAL_EX                                              'DOMNode'
          4        SEND_VAL_EX                                              '%5CDOMWorks%5CNode'
          5        DO_FCALL                                      0          
   22     6      > RETURN                                                   null

End of function __construct

End of class DOMWorks\Document.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.03 ms | 1394 KiB | 13 Q