3v4l.org

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

Function highest_multiple_of_7:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 5
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 5
Branch analysis from position: 12
Branch analysis from position: 5
filename:       /in/A1O3o
function name:  highest_multiple_of_7
number of ops:  13
compiled vars:  !0 = $limit, !1 = $i, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, !0
          2        SUB                                              ~4      !0, 7
          3        ASSIGN                                                   !2, ~4
          4      > JMP                                                      ->10
    6     5    >   MOD                                              ~6      !1, 7
          6        BOOL_NOT                                         ~7      ~6
          7      > JMPZ                                                     ~7, ->9
    7     8    > > RETURN                                                   !1
    5     9    >   PRE_DEC                                                  !1
         10    >   IS_SMALLER                                               !2, !1
         11      > JMPNZ                                                    ~9, ->5
   10    12    > > RETURN                                                   null

End of function highest_multiple_of_7

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.19 ms | 1398 KiB | 14 Q