3v4l.org

run code in 500+ 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($o->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 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/aPX8b
function name:  (null)
number of ops:  18
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        FETCH_OBJ_R                                          ~6      !0, 'foo'
          9        SEND_VAL                                                     ~6
         10        DO_ICALL                                             $7      
         11      > JMPZ                                                         $7, ->14
   11    12    >   ECHO                                                         'foo+IS+callable%21%0A'
   10    13      > JMP                                                          ->15
   13    14    >   ECHO                                                         'foo+IS+NOT+callable%21%0A'
   15    15    >   INIT_METHOD_CALL                                             !0, 'foo'
         16        DO_FCALL                                          0          
         17      > RETURN                                                       1

Class C:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aPX8b
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.5.0


preferences:
155.59 ms | 2246 KiB | 14 Q