3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static function b() { return 'soy b static'; } function a() { return 'soy a'; } } $z=new a; var_dump(is_callable($z::b())); die; $b=['a', 'b']; var_dump(is_callable($b)); $c='a' .'::b'; var_dump(is_callable($c));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/IBfi7
function name:  (null)
number of ops:  28
compiled vars:  !0 = $z, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $3      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   18     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'is_callable'
          5        FETCH_CLASS                                   0  $6      !0
          6        INIT_STATIC_METHOD_CALL                                  $6, 'b'
          7        DO_FCALL                                      0  $7      
          8        SEND_VAR                                                 $7
          9        DO_ICALL                                         $8      
         10        SEND_VAR                                                 $8
         11        DO_ICALL                                                 
   20    12      > EXIT                                                     
   21    13*       ASSIGN                                                   !1, <array>
   23    14*       INIT_FCALL                                               'var_dump'
         15*       INIT_FCALL                                               'is_callable'
         16*       SEND_VAR                                                 !1
         17*       DO_ICALL                                         $11     
         18*       SEND_VAR                                                 $11
         19*       DO_ICALL                                                 
   26    20*       ASSIGN                                                   !2, 'a%3A%3Ab'
   28    21*       INIT_FCALL                                               'var_dump'
         22*       INIT_FCALL                                               'is_callable'
         23*       SEND_VAR                                                 !2
         24*       DO_ICALL                                         $14     
         25*       SEND_VAR                                                 $14
         26*       DO_ICALL                                                 
         27*     > RETURN                                                   1

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

End of function b

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

End of function a

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.84 ms | 1396 KiB | 17 Q