3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { foreach (['a', 'b', 'c'] as $letter) { if ($letter == 'b') { return 'beta'; } } echo '-test-'; return 'gamma'; } var_dump(foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VngNJ
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 7
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/VngNJ
function name:  foo
number of ops:  11
compiled vars:  !0 = $letter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                       $1      <array>, ->7
          1    > > FE_FETCH_R                                               $1, !0, ->7
    4     2    >   IS_EQUAL                                                 !0, 'b'
          3      > JMPZ                                                     ~2, ->6
    5     4    >   FE_FREE                                                  $1
          5      > RETURN                                                   'beta'
    3     6    > > JMP                                                      ->1
          7    >   FE_FREE                                                  $1
    8     8        ECHO                                                     '-test-'
    9     9      > RETURN                                                   'gamma'
   10    10*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.39 ms | 1398 KiB | 16 Q