3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Interfaze { public function hello($name); public function getName(); } class ParentClazz implements Interfaze { public function __construct($name) { $this->hello($name); } public function hello($name) { echo "Hello, $name!\n"; $this->name = $name; } public function getName() { return $this->name; } } class ChildClazz extends ParentClazz { public function __construct($name) { echo "Loaded from the child class.\n"; parent::__construct($name); } } $childclass = new ChildClazz("Payton"); echo $childclass->getName() . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1Wbo
function name:  (null)
number of ops:  11
compiled vars:  !0 = $childclass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'parentclazz'
   25     1        DECLARE_CLASS                                            'childclazz', 'parentclazz'
   33     2        NEW                                              $1      'ChildClazz'
          3        SEND_VAL_EX                                              'Payton'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   34     6        INIT_METHOD_CALL                                         !0, 'getName'
          7        DO_FCALL                                      0  $4      
          8        CONCAT                                           ~5      $4, '%0A'
          9        ECHO                                                     ~5
         10      > RETURN                                                   1

Class Interfaze:
Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1Wbo
function name:  hello
number of ops:  2
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function hello

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1Wbo
function name:  getName
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   null

End of function getname

End of class Interfaze.

Class ParentClazz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1Wbo
function name:  __construct
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_METHOD_CALL                                         'hello'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function __construct

Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1Wbo
function name:  hello
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        ROPE_INIT                                     3  ~2      'Hello%2C+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%21%0A'
          4        ECHO                                                     ~1
   17     5        ASSIGN_OBJ                                               'name'
          6        OP_DATA                                                  !0
   18     7      > RETURN                                                   null

End of function hello

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1Wbo
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   22     2*     > RETURN                                                   null

End of function getname

End of class ParentClazz.

Class ChildClazz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1Wbo
function name:  __construct
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   28     1        ECHO                                                     'Loaded+from+the+child+class.%0A'
   29     2        INIT_STATIC_METHOD_CALL                                  
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
   30     5      > RETURN                                                   null

End of function __construct

End of class ChildClazz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.87 ms | 1399 KiB | 13 Q