3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function bar() { return __METHOD__; } public static function class_() { return __CLASS__; } } function c() { return Foo::class_(); } echo c()::bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TM6bm
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'c'
          1        DO_FCALL                                      0  $0      
          2        FETCH_CLASS                                   0  $1      $0
          3        INIT_STATIC_METHOD_CALL                                  $1, 'bar'
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
          6      > RETURN                                                   1

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

End of function c

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

End of function bar

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

End of function class_

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.31 ms | 1398 KiB | 14 Q