3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C{ public $foo = 5; public function foo(){echo "foo is evidently a callable function!";} } $o=new C(); if(is_int($o->foo)){ echo "foo is an integer!\n"; } if(is_callable(["C", "foo"] )){ echo "foo IS callable!\n"; }else{ echo "foo IS NOT callable!\n"; } $o->foo();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/CeBFH
function name:  (null)
number of ops:  17
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    7     3        FETCH_OBJ_R                                      ~4      !0, 'foo'
          4        TYPE_CHECK                                   16          ~4
          5      > JMPZ                                                     ~5, ->7
    8     6    >   ECHO                                                     'foo+is+an+integer%21%0A'
   10     7    >   INIT_FCALL                                               'is_callable'
          8        SEND_VAL                                                 <array>
          9        DO_ICALL                                         $6      
         10      > JMPZ                                                     $6, ->13
   11    11    >   ECHO                                                     'foo+IS+callable%21%0A'
         12      > JMP                                                      ->14
   13    13    >   ECHO                                                     'foo+IS+NOT+callable%21%0A'
   15    14    >   INIT_METHOD_CALL                                         !0, 'foo'
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Class C:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CeBFH
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'foo+is+evidently+a+callable+function%21'
          1      > RETURN                                                   null

End of function foo

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.66 ms | 1395 KiB | 15 Q