3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = []; $ar[] = [45 => ['1 day']]; $ar[] = [45 => ['- None -']]; $ar[] = [46 => ['2 day']]; $ar[] = [46 => ['- None -']]; $ar[] = [47 => ['3 day']]; print_r($ar); foreach($ar as $key=>$row){ foreach($row as $ind=>$val){ if ($val[0] == '- None -') unset($ar[$key]); } } sort($ar); print_r($ar);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 27
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 24
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 25
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/nlC3W
function name:  (null)
number of ops:  35
compiled vars:  !0 = $ar, !1 = $row, !2 = $key, !3 = $val, !4 = $ind
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  <array>
    5     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  <array>
    6     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  <array>
    7     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  <array>
    8     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  <array>
   10    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   12    14      > FE_RESET_R                                       $12     !0, ->27
         15    > > FE_FETCH_R                                       ~13     $12, !1, ->27
         16    >   ASSIGN                                                   !2, ~13
   13    17      > FE_RESET_R                                       $15     !1, ->25
         18    > > FE_FETCH_R                                       ~16     $15, !3, ->25
         19    >   ASSIGN                                                   !4, ~16
   14    20        FETCH_DIM_R                                      ~18     !3, 0
         21        IS_EQUAL                                                 ~18, '-+None+-'
         22      > JMPZ                                                     ~19, ->24
         23    >   UNSET_DIM                                                !0, !2
   13    24    > > JMP                                                      ->18
         25    >   FE_FREE                                                  $15
   12    26      > JMP                                                      ->15
         27    >   FE_FREE                                                  $12
   18    28        INIT_FCALL                                               'sort'
         29        SEND_REF                                                 !0
         30        DO_ICALL                                                 
   20    31        INIT_FCALL                                               'print_r'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.64 ms | 1400 KiB | 17 Q