3v4l.org

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

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

End of function bar

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IOu02
function name:  baz
number of ops:  5
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      'Foo%3A%3Abaz'
    7     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.01 ms | 1386 KiB | 15 Q