3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { } } function gimme_a_callable(callable $callable) { } error_reporting(-1); var_dump(is_callable([Foo::class, 'bar'])); gimme_a_callable([Foo::class, 'bar']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/akn6u
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   20     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'is_callable'
          5        SEND_VAL                                                 <array>
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                                 
   21     9        INIT_FCALL                                               'gimme_a_callable'
         10        SEND_VAL                                                 <array>
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function gimme_a_callable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/akn6u
function name:  gimme_a_callable
number of ops:  2
compiled vars:  !0 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   16     1      > RETURN                                                   null

End of function gimme_a_callable

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.48 ms | 1463 KiB | 17 Q