3v4l.org

run code in 300+ PHP versions simultaneously
<?php class InvokableUntrustedObject { public function __invoke() { return 'test'; } } var_dump(is_callable(InvokableUntrustedObject::class)); $a = new InvokableUntrustedObject(); var_dump(is_callable($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3ZaZi
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'is_callable'
          2        SEND_VAL                                                 'InvokableUntrustedObject'
          3        DO_ICALL                                         $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                                 
   12     6        NEW                                              $3      'InvokableUntrustedObject'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $3
   14     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'is_callable'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

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

End of function __invoke

End of class InvokableUntrustedObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.54 ms | 1399 KiB | 17 Q