3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function nonstaticWillDelegateToStatic() { static::staticfunction(); } public static function staticWillDelegateToNonstatic() { static::nonstaticfunction(); } public function nonstaticfunction() { } public static function staticfunction() { } } $foo = new Foo(); $foo->nonstaticWillDelegateToStatic();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iKbFm
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     3        INIT_METHOD_CALL                                         !0, 'nonstaticWillDelegateToStatic'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function nonstaticwilldelegatetostatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iKbFm
function name:  nonstaticWillDelegateToStatic
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_STATIC_METHOD_CALL                                  'staticfunction'
          1        DO_FCALL                                      0          
    9     2      > RETURN                                                   null

End of function nonstaticwilldelegatetostatic

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

End of function staticwilldelegatetononstatic

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

End of function nonstaticfunction

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

End of function staticfunction

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.86 ms | 1395 KiB | 13 Q