3v4l.org

run code in 300+ PHP versions simultaneously
<?php $page = 7; $max_page = 6; $num_of_posts = 6; if ($page > $max_page) { $page = $page - floor($page/$max_page)*$max_page; } $page -= 1; echo $page; echo "\n"; echo $page*$num_of_posts;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/rgDG9
function name:  (null)
number of ops:  18
compiled vars:  !0 = $page, !1 = $max_page, !2 = $num_of_posts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 7
    5     1        ASSIGN                                                   !1, 6
    6     2        ASSIGN                                                   !2, 6
    7     3        IS_SMALLER                                               !1, !0
          4      > JMPZ                                                     ~6, ->12
    8     5    >   INIT_FCALL                                               'floor'
          6        DIV                                              ~7      !0, !1
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                         $8      
          9        MUL                                              ~9      !1, $8
         10        SUB                                              ~10     !0, ~9
         11        ASSIGN                                                   !0, ~10
   10    12    >   ASSIGN_OP                                     2          !0, 1
   11    13        ECHO                                                     !0
   12    14        ECHO                                                     '%0A'
   13    15        MUL                                              ~13     !0, !2
         16        ECHO                                                     ~13
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.41 ms | 1394 KiB | 15 Q