3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { private static function privateMethod(): void {} public static function getCallable(): callable { return [self::class, 'privateMethod']; } } $callable = Example::getCallable(); $callable();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/li79g
function name:  (null)
number of ops:  6
compiled vars:  !0 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'Example', 'getCallable'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   14     3        INIT_DYNAMIC_CALL                                        !0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function privatemethod

Function getcallable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/li79g
function name:  getCallable
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   VERIFY_RETURN_TYPE                               ~0      <array>
          1      > RETURN                                                   ~0
   10     2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function getcallable

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.56 ms | 1393 KiB | 13 Q