3v4l.org

run code in 300+ 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 = 26
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 26
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/H0If0
function name:  (null)
number of ops:  28
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, ->26
          3    > > FE_FETCH_R                                               $6, !2, ->26
   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, ->23
         17    >   INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '+%26+'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $12     
         21        QM_ASSIGN                                        ~13     $12
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~13     ''
         24    >   ECHO                                                     ~13
   11    25      > JMP                                                      ->3
         26    >   FE_FREE                                                  $6
   14    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.68 ms | 1006 KiB | 17 Q