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=[new a, 'b']; var_dump(is_callable($b, false, $ret)); var_dump($ret); var_dump(get_defined_vars());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mQlEP
function name:  (null)
number of ops:  22
compiled vars:  !0 = $b, !1 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~4      $2
          3        ADD_ARRAY_ELEMENT                                ~4      'b'
          4        ASSIGN                                                   !0, ~4
   23     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'is_callable'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 <false>
          9        SEND_REF                                                 !1
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
   26    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   29    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'get_defined_vars'
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

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