3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = []; $required =['validation' => 0, 'http_verb' => 1, 'response' => 2, 'url' => 3]; //we only care about the keys of this array $missingKeys = array_diff_key($required, $data); $missingCount = sizeof($missingKeys); if ($missingCount > 1) { var_dump(implode(', ', array_flip($missingKeys))); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/bS5pb
function name:  (null)
number of ops:  22
compiled vars:  !0 = $data, !1 = $required, !2 = $missingKeys, !3 = $missingCount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'array_diff_key'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    6     7        COUNT                                            ~8      !2
          8        ASSIGN                                                   !3, ~8
    8     9        IS_SMALLER                                               1, !3
         10      > JMPZ                                                     ~10, ->21
    9    11    >   INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'implode'
         13        SEND_VAL                                                 '%2C+'
         14        INIT_FCALL                                               'array_flip'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $11     
         17        SEND_VAR                                                 $11
         18        DO_ICALL                                         $12     
         19        SEND_VAR                                                 $12
         20        DO_ICALL                                                 
   10    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.99 ms | 1395 KiB | 21 Q