3v4l.org

run code in 500+ PHP versions simultaneously
<?php $step = 5; $usernumber = 188; $myseries = range(0, 59, $step); $myseries = range(0, 59, 5); $check = round($usernumber/$step) * $step; echo "<br>".$check; if(in_array($check,$myseries)) echo "<br>".$check; else echo max($myseries);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 27
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ia4gM
function name:  (null)
number of ops:  32
compiled vars:  !0 = $step, !1 = $usernumber, !2 = $myseries, !3 = $check
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 5
    3     1        ASSIGN                                                       !1, 188
    4     2        INIT_FCALL                                                   'range'
          3        SEND_VAL                                                     0
          4        SEND_VAL                                                     59
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !2, $6
    6     8        INIT_FCALL                                                   'range'
          9        SEND_VAL                                                     0
         10        SEND_VAL                                                     59
         11        SEND_VAL                                                     5
         12        DO_ICALL                                             $8      
         13        ASSIGN                                                       !2, $8
    8    14        INIT_FCALL                                                   'round'
         15        DIV                                                  ~10     !1, !0
         16        SEND_VAL                                                     ~10
         17        DO_ICALL                                             $11     
         18        MUL                                                  ~12     !0, $11
         19        ASSIGN                                                       !3, ~12
    9    20        CONCAT                                               ~14     '%3Cbr%3E', !3
         21        ECHO                                                         ~14
   10    22        FRAMELESS_ICALL_2                in_array            ~15     !3, !2
         23      > JMPZ                                                         ~15, ->27
   11    24    >   CONCAT                                               ~16     '%3Cbr%3E', !3
         25        ECHO                                                         ~16
   10    26      > JMP                                                          ->31
   13    27    >   INIT_FCALL                                                   'max'
         28        SEND_VAR                                                     !2
         29        DO_ICALL                                             $17     
         30        ECHO                                                         $17
         31    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
216.65 ms | 3273 KiB | 16 Q