3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo($bar) { return $bar * 2; } $x = 'foo'; echo ( true === is_callable($x) ? 'T' : 'F' ); echo ( 4 == $x(2) ? 'T' : 'F' );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
Branch analysis from position: 17
filename:       /in/A3VvYX
function name:  (null)
number of ops:  20
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, 'foo'
   10     1        INIT_FCALL                                                   'is_callable'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $2      
          4        TYPE_CHECK                                        8          $2
          5      > JMPZ                                                         ~3, ->8
          6    >   QM_ASSIGN                                            ~4      'T'
          7      > JMP                                                          ->9
          8    >   QM_ASSIGN                                            ~4      'F'
          9    >   ECHO                                                         ~4
   12    10        INIT_DYNAMIC_CALL                                            !0
         11        SEND_VAL_EX                                                  2
         12        DO_FCALL                                          0  $5      
         13        IS_EQUAL                                                     $5, 4
         14      > JMPZ                                                         ~6, ->17
         15    >   QM_ASSIGN                                            ~7      'T'
         16      > JMP                                                          ->18
         17    >   QM_ASSIGN                                            ~7      'F'
         18    >   ECHO                                                         ~7
         19      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A3VvYX
function name:  foo
number of ops:  4
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        MUL                                                  ~1      !0, 2
          2      > RETURN                                                       ~1
    5     3*     > RETURN                                                       null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
197.53 ms | 1980 KiB | 14 Q