3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class Class1 { var $testVar = 5; function foo(){ echo $this->foo2(); } function foo2(){ } } class Class2 { function __construct(){ $this->class1 = new Class1(); } function bar(){ //This doesn't report an error because error level 'strict' is disabled. Class1::foo(); } } $class2 = new Class2(); $class2->bar(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7jSP
function name:  (null)
number of ops:  9
compiled vars:  !0 = $class2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   31     3        NEW                                              $2      'Class2'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   33     6        INIT_METHOD_CALL                                         !0, 'bar'
          7        DO_FCALL                                      0          
   36     8      > RETURN                                                   1

Class Class1:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7jSP
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_METHOD_CALL                                         'foo2'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   11     3      > RETURN                                                   null

End of function foo

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

End of function foo2

End of class Class1.

Class Class2:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7jSP
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Class1'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'class1'
          3        OP_DATA                                                  $1
   22     4      > RETURN                                                   null

End of function __construct

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7jSP
function name:  bar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_STATIC_METHOD_CALL                                  'Class1', 'foo'
          1        DO_FCALL                                      0          
   27     2      > RETURN                                                   null

End of function bar

End of class Class2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.28 ms | 1396 KiB | 15 Q