3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ ['key1', 'value1'], ['key2', 'value2'], ['key3', 'value3'], ['key4', 'value4'], ['key5'], [null, 'value6'], ]; if(is_array($data)){ $cont = ''; foreach($data as $value){ if(count($value) === 2 && is_string($value[0]) && is_string($value[1])){ $cont .= sprintf("%s:%s%s", $value[0], $value[1], PHP_EOL); } } } var_dump($cont);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 28
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 27
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 27
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 26
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 26
Branch analysis from position: 16
Branch analysis from position: 12
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 28
filename:       /in/cUE79
function name:  (null)
number of ops:  32
compiled vars:  !0 = $data, !1 = $cont, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~4, ->28
   14     3    >   ASSIGN                                                   !1, ''
   15     4      > FE_RESET_R                                       $6      !0, ->27
          5    > > FE_FETCH_R                                               $6, !2, ->27
   16     6    >   COUNT                                            ~7      !2
          7        IS_IDENTICAL                                     ~8      ~7, 2
          8      > JMPZ_EX                                          ~8      ~8, ->12
          9    >   FETCH_DIM_R                                      ~9      !2, 0
         10        TYPE_CHECK                                   64  ~10     ~9
         11        BOOL                                             ~8      ~10
         12    > > JMPZ_EX                                          ~8      ~8, ->16
         13    >   FETCH_DIM_R                                      ~11     !2, 1
         14        TYPE_CHECK                                   64  ~12     ~11
         15        BOOL                                             ~8      ~12
         16    > > JMPZ                                                     ~8, ->26
   17    17    >   INIT_FCALL                                               'sprintf'
         18        SEND_VAL                                                 '%25s%3A%25s%25s'
         19        FETCH_DIM_R                                      ~13     !2, 0
         20        SEND_VAL                                                 ~13
         21        FETCH_DIM_R                                      ~14     !2, 1
         22        SEND_VAL                                                 ~14
         23        SEND_VAL                                                 '%0A'
         24        DO_ICALL                                         $15     
         25        ASSIGN_OP                                     8          !1, $15
   15    26    > > JMP                                                      ->5
         27    >   FE_FREE                                                  $6
   21    28    >   INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.18 ms | 1396 KiB | 17 Q