3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p = array( 'test' => 7, 'checkbox_2' => 'on', 'checkbox_4' => 'on', 'checkbox_10' => 'on', 'Submit' => '', 'name' => 20, ); foreach ($p as $key => $val) { //if (substr($key, 0, strlen('checkbox_')) == 'checkbox_') { if (strpos($key, 'checkbox_') === 0) { echo substr($key, strlen('checkbox_')) . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/GieqL
function name:  (null)
number of ops:  19
compiled vars:  !0 = $p, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1      > FE_RESET_R                                       $4      !0, ->17
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->17
          3    >   ASSIGN                                                   !2, ~5
   14     4        INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !2
          6        SEND_VAL                                                 'checkbox_'
          7        DO_ICALL                                         $7      
          8        IS_IDENTICAL                                             $7, 0
          9      > JMPZ                                                     ~8, ->16
   15    10    >   INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 9
         13        DO_ICALL                                         $9      
         14        CONCAT                                           ~10     $9, '%0A'
         15        ECHO                                                     ~10
   12    16    > > JMP                                                      ->2
         17    >   FE_FREE                                                  $4
   17    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.25 ms | 1395 KiB | 17 Q