3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach( range( 0, 5) as $c) { $mod = $c % 5; $input = ($mod < 3) ? $c - $mod : $c + (5 - $mod); echo $i . ' ' . $input . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 22
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/CnUVv
function name:  (null)
number of ops:  24
compiled vars:  !0 = $c, !1 = $mod, !2 = $input, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 5
          3        DO_ICALL                                         $4      
          4      > FE_RESET_R                                       $5      $4, ->22
          5    > > FE_FETCH_R                                               $5, !0, ->22
    4     6    >   MOD                                              ~6      !0, 5
          7        ASSIGN                                                   !1, ~6
    5     8        IS_SMALLER                                               !1, 3
          9      > JMPZ                                                     ~8, ->13
         10    >   SUB                                              ~9      !0, !1
         11        QM_ASSIGN                                        ~10     ~9
         12      > JMP                                                      ->16
         13    >   SUB                                              ~11     5, !1
         14        ADD                                              ~12     !0, ~11
         15        QM_ASSIGN                                        ~10     ~12
         16    >   ASSIGN                                                   !2, ~10
    6    17        CONCAT                                           ~14     !3, '+'
         18        CONCAT                                           ~15     ~14, !2
         19        CONCAT                                           ~16     ~15, '%0A'
         20        ECHO                                                     ~16
    3    21      > JMP                                                      ->5
         22    >   FE_FREE                                                  $5
    7    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.12 ms | 1395 KiB | 15 Q