3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Controller { public function __invoke() { print "Controller was called"; } } $controller = new Controller; if (is_object($controller) && is_callable($controller)) { $controller(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 9
filename:       /in/1k9NP
function name:  (null)
number of ops:  13
compiled vars:  !0 = $controller
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $1      'Controller'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   11     3        TYPE_CHECK                                      256  ~4      !0
          4      > JMPZ_EX                                              ~4      ~4, ->9
          5    >   INIT_FCALL                                                   'is_callable'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $5      
          8        BOOL                                                 ~4      $5
          9    > > JMPZ                                                         ~4, ->12
   12    10    >   INIT_DYNAMIC_CALL                                            !0
         11        DO_FCALL                                          0          
   13    12    > > RETURN                                                       1

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

End of function __invoke

End of class Controller.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.36 ms | 1993 KiB | 14 Q