3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($d) { throw new LogicException('S'); } function foo2($d) { foreach ($d as $f) { } } @foo('s'); @foo2('s'); foo2('s');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3U2Uv
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   BEGIN_SILENCE                                    ~0      
          1        INIT_FCALL                                               'foo'
          2        SEND_VAL                                                 's'
          3        DO_FCALL                                      0          
          4        END_SILENCE                                              ~0
   13     5        BEGIN_SILENCE                                    ~2      
          6        INIT_FCALL                                               'foo2'
          7        SEND_VAL                                                 's'
          8        DO_FCALL                                      0          
          9        END_SILENCE                                              ~2
   14    10        INIT_FCALL                                               'foo2'
         11        SEND_VAL                                                 's'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/3U2Uv
function name:  foo
number of ops:  6
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        NEW                                              $1      'LogicException'
          2        SEND_VAL_EX                                              'S'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
    5     5*     > RETURN                                                   null

End of function foo

Function foo2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/3U2Uv
function name:  foo2
number of ops:  6
compiled vars:  !0 = $d, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1      > FE_RESET_R                                       $2      !0, ->4
          2    > > FE_FETCH_R                                               $2, !1, ->4
          3    > > JMP                                                      ->2
          4    >   FE_FREE                                                  $2
   10     5      > RETURN                                                   null

End of function foo2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.83 ms | 1399 KiB | 16 Q