3v4l.org

run code in 300+ PHP versions simultaneously
<?php $step = 5; $usernumber = 18; $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 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cfLva
function name:  (null)
number of ops:  38
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, 18
    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        CONCAT                                           ~15     ~14, '--'
         22        ECHO                                                     ~15
   10    23        INIT_FCALL                                               'in_array'
         24        SEND_VAR                                                 !3
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $16     
         27      > JMPZ                                                     $16, ->32
   11    28    >   CONCAT                                           ~17     '%3Cbr%3E', !3
         29        CONCAT                                           ~18     ~17, '--'
         30        ECHO                                                     ~18
         31      > JMP                                                      ->37
   13    32    >   INIT_FCALL                                               'max'
         33        FETCH_CONSTANT                                   ~19     'myseries'
         34        SEND_VAL                                                 ~19
         35        DO_ICALL                                         $20     
         36        ECHO                                                     $20
         37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.97 ms | 1396 KiB | 21 Q