3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = 1; $result = ((round($length / 8) * 8) - $length); echo $result > 0 ? $result : 8 - $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YEsXg
function name:  (null)
number of ops:  16
compiled vars:  !0 = $length, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        INIT_FCALL                                               'round'
          2        DIV                                              ~3      !0, 8
          3        SEND_VAL                                                 ~3
          4        DO_ICALL                                         $4      
          5        MUL                                              ~5      $4, 8
          6        SUB                                              ~6      ~5, !0
          7        ASSIGN                                                   !1, ~6
    5     8        IS_SMALLER                                               0, !1
          9      > JMPZ                                                     ~8, ->12
         10    >   QM_ASSIGN                                        ~9      !1
         11      > JMP                                                      ->14
         12    >   SUB                                              ~10     8, !1
         13        QM_ASSIGN                                        ~9      ~10
         14    >   ECHO                                                     ~9
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.23 ms | 1386 KiB | 15 Q