3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bar(string $bar, string $expected) : bool { return $expected === $bar; } foreach ( [ 'a' => 'b', 'foo' => 'fop', ] as $to_increment => $expected ) { echo $to_increment, ',', $expected, ','; ++$to_increment; echo bar($to_increment, $expected) ? 'yup' : 'nope', "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 19
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/OMidv
function name:  (null)
number of ops:  21
compiled vars:  !0 = $expected, !1 = $to_increment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > FE_RESET_R                                       $2      <array>, ->19
          1    > > FE_FETCH_R                                       ~3      $2, !0, ->19
   10     2    >   ASSIGN                                                   !1, ~3
   12     3        ECHO                                                     !1
          4        ECHO                                                     '%2C'
          5        ECHO                                                     !0
          6        ECHO                                                     '%2C'
   14     7        PRE_INC                                                  !1
   16     8        INIT_FCALL                                               'bar'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $6      
         12      > JMPZ                                                     $6, ->15
         13    >   QM_ASSIGN                                        ~7      'yup'
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~7      'nope'
         16    >   ECHO                                                     ~7
         17        ECHO                                                     '%0A'
    8    18      > JMP                                                      ->1
         19    >   FE_FREE                                                  $2
   17    20      > RETURN                                                   1

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

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.83 ms | 1002 KiB | 14 Q