3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bucketize($num, $size){ $overage = $num % $size; $base = $num - $overage; return $base . '+'; } for ($i=9; $i < 26; $i++){ var_dump(bucketize($i, 5)); }
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 = 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/fk35k
function name:  (null)
number of ops:  13
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 9
          1      > JMP                                                      ->10
   11     2    >   INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'bucketize'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 5
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
   10     9        PRE_INC                                                  !0
         10    >   IS_SMALLER                                               !0, 26
         11      > JMPNZ                                                    ~5, ->2
   12    12    > > RETURN                                                   1

Function bucketize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fk35k
function name:  bucketize
number of ops:  9
compiled vars:  !0 = $num, !1 = $size, !2 = $overage, !3 = $base
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        MOD                                              ~4      !0, !1
          3        ASSIGN                                                   !2, ~4
    5     4        SUB                                              ~6      !0, !2
          5        ASSIGN                                                   !3, ~6
    7     6        CONCAT                                           ~8      !3, '%2B'
          7      > RETURN                                                   ~8
    8     8*     > RETURN                                                   null

End of function bucketize

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.96 ms | 1398 KiB | 16 Q