3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = ['checkbox_1' => 1, 'checkbox_4' => 8, 'checkbox_8' => 1]; $result = ''; for($i = 1; $i <= 10; $i++) { if(isset($_POST['checkbox_' . $i])) $result .= ' ' . $i; } echo trim($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
Branch analysis from position: 5
Branch analysis from position: 11
filename:       /in/1QPu6
function name:  (null)
number of ops:  19
compiled vars:  !0 = $result, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_W                      global              $2      '_POST'
          1        ASSIGN                                                   $2, <array>
    3     2        ASSIGN                                                   !0, ''
    4     3        ASSIGN                                                   !1, 1
          4      > JMP                                                      ->12
    6     5    >   CONCAT                                           ~7      'checkbox_', !1
          6        FETCH_IS                                         ~6      '_POST'
          7        ISSET_ISEMPTY_DIM_OBJ                         0          ~6, ~7
          8      > JMPZ                                                     ~8, ->11
    7     9    >   CONCAT                                           ~9      '+', !1
         10        ASSIGN_OP                                     8          !0, ~9
    4    11    >   PRE_INC                                                  !1
         12    >   IS_SMALLER_OR_EQUAL                                      !1, 10
         13      > JMPNZ                                                    ~12, ->5
    9    14    >   INIT_FCALL                                               'trim'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $13     
         17        ECHO                                                     $13
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.94 ms | 1395 KiB | 15 Q