3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = ['a' => -1, 'b' => 0.5, 'c' =>0.5]; //Combinations $c = [ ['a','b','c'], ['a','b'], ['a','c'], ['b','c'] ]; foreach($c as $v){ $s = array_sum(array_intersect_key($a,array_flip($v))); echo !$s ? (implode(' & ',$v)) : ''; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/H0If0
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $c, !2 = $v, !3 = $s
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1        ASSIGN                                                       !1, <array>
   11     2      > FE_RESET_R                                           $6      !1, ->23
          3    > > FE_FETCH_R                                                   $6, !2, ->23
   12     4    >   INIT_FCALL                                                   'array_sum'
          5        INIT_FCALL                                                   'array_intersect_key'
          6        SEND_VAR                                                     !0
          7        INIT_FCALL                                                   'array_flip'
          8        SEND_VAR                                                     !2
          9        DO_ICALL                                             $7      
         10        SEND_VAR                                                     $7
         11        DO_ICALL                                             $8      
         12        SEND_VAR                                                     $8
         13        DO_ICALL                                             $9      
         14        ASSIGN                                                       !3, $9
   13    15        BOOL_NOT                                             ~11     !3
         16      > JMPZ                                                         ~11, ->20
         17    >   FRAMELESS_ICALL_2                implode             ~12     '+%26+', !2
         18        QM_ASSIGN                                            ~13     ~12
         19      > JMP                                                          ->21
         20    >   QM_ASSIGN                                            ~13     ''
         21    >   ECHO                                                         ~13
   11    22      > JMP                                                          ->3
         23    >   FE_FREE                                                      $6
   14    24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.26 ms | 2205 KiB | 16 Q