3v4l.org

run code in 300+ PHP versions simultaneously
<?php fscanf(STDIN, "%d", $n); $c = 0; for($i=1;$i<=$n;$i++) { if($i % 2 == 0 )continue; $c += substr_count($i, 1); } echo $c . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
Branch analysis from position: 9
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
Branch analysis from position: 9
filename:       /in/jCFbX
function name:  (null)
number of ops:  24
compiled vars:  !0 = $n, !1 = $c, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fscanf'
          1        FETCH_CONSTANT                                   ~3      'STDIN'
          2        SEND_VAL                                                 ~3
          3        SEND_VAL                                                 '%25d'
          4        SEND_REF                                                 !0
          5        DO_ICALL                                                 
    4     6        ASSIGN                                                   !1, 0
    5     7        ASSIGN                                                   !2, 1
          8      > JMP                                                      ->19
    6     9    >   MOD                                              ~7      !2, 2
         10        IS_EQUAL                                                 ~7, 0
         11      > JMPZ                                                     ~8, ->13
         12    > > JMP                                                      ->18
    7    13    >   INIT_FCALL                                               'substr_count'
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $9      
         17        ASSIGN_OP                                     1          !1, $9
    5    18    >   PRE_INC                                                  !2
         19    >   IS_SMALLER_OR_EQUAL                                      !2, !0
         20      > JMPNZ                                                    ~12, ->9
   10    21    >   CONCAT                                           ~13     !1, '%0A'
         22        ECHO                                                     ~13
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.26 ms | 1395 KiB | 17 Q