3v4l.org

run code in 300+ PHP versions simultaneously
<?php function odd ($x) { return ($x % 2 === 1)+0; }; $cnt = 0; foreach (range(1,1000) as $x) { $cnt += odd($x); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/EIL8R
function name:  (null)
number of ops:  14
compiled vars:  !0 = $cnt, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 0
    6     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 1000
          4        DO_ICALL                                         $3      
          5      > FE_RESET_R                                       $4      $3, ->12
          6    > > FE_FETCH_R                                               $4, !1, ->12
    7     7    >   INIT_FCALL                                               'odd'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $5      
         10        ASSIGN_OP                                     1          !0, $5
    6    11      > JMP                                                      ->6
         12    >   FE_FREE                                                  $4
    8    13      > RETURN                                                   1

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

End of function odd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.89 ms | 1398 KiB | 16 Q