3v4l.org

run code in 300+ PHP versions simultaneously
<?php function odd_1000(){ for ($x = 1; $x <= 1000; $x++) { if ($x % 2 == 1) { echo $x; echo " "; } } } odd_1000();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4JF9d
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'odd_1000'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function odd_1000:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 2
Branch analysis from position: 10
Branch analysis from position: 2
Branch analysis from position: 7
filename:       /in/4JF9d
function name:  odd_1000
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->8
    5     2    >   MOD                                              ~2      !0, 2
          3        IS_EQUAL                                                 ~2, 1
          4      > JMPZ                                                     ~3, ->7
    6     5    >   ECHO                                                     !0
    7     6        ECHO                                                     '+'
    4     7    >   PRE_INC                                                  !0
          8    >   IS_SMALLER_OR_EQUAL                                      !0, 1000
          9      > JMPNZ                                                    ~5, ->2
   10    10    > > RETURN                                                   null

End of function odd_1000

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.57 ms | 1397 KiB | 14 Q