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())); $b=['a', 'a']; 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 = 62) Position 1 = -2
filename:       /in/bnXnO
function name:  (null)
number of ops:  15
compiled vars:  !0 = $b, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, <array>
   23     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'is_callable'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                                 
   26     7        ASSIGN                                                   !1, 'a%3A%3Ab'
   28     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'is_callable'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bnXnO
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/bnXnO
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:
153.46 ms | 1395 KiB | 17 Q