3v4l.org

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

Class CallableClass:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/btDvd
function name:  __invoke
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'var_dump'
          2        MUL                                              ~1      !0, 5
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    7     5      > RETURN                                                   null

End of function __invoke

End of class CallableClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.12 ms | 1395 KiB | 17 Q