3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace App { class Util { public function getGenres(){} } class A { public function notCallable() { return \is_callable(['Util', 'getGenres']); } public function isCallable() { return \is_callable(['App\Util', 'getGenres']); } } } namespace B { $a = new \App\A(); \var_dump($a->notCallable()); \var_dump($a->isCallable()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gY4gN
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'App%5CA'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'notCallable'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   28     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'isCallable'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
   29    13      > RETURN                                                   1

Class App\Util:
Function getgenres:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gY4gN
function name:  getGenres
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   null

End of function getgenres

End of class App\Util.

Class App\A:
Function notcallable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gY4gN
function name:  notCallable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'is_callable'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $0      
          3      > RETURN                                                   $0
   14     4*     > RETURN                                                   null

End of function notcallable

Function iscallable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gY4gN
function name:  isCallable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'is_callable'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $0      
          3      > RETURN                                                   $0
   19     4*     > RETURN                                                   null

End of function iscallable

End of class App\A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.27 ms | 1000 KiB | 15 Q