3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row = array ('name'=>'martin','tel'=>null, 'experience'=> 'high','password'=>'','occupation'=>''); $missing_values = array_filter($row, function($value) { return $value == ''; }); $error = []; print_r($missing_values); foreach($missing_values as $k=>$v){ $error[$k] = "$k can't be empty"; } print_r($error);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/akRoB
function name:  (null)
number of ops:  24
compiled vars:  !0 = $row, !1 = $missing_values, !2 = $error, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
          4        SEND_VAL                                                 ~6
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !1, $7
    4     7        ASSIGN                                                   !2, <array>
    5     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
    6    11      > FE_RESET_R                                       $11     !1, ->19
         12    > > FE_FETCH_R                                       ~12     $11, !3, ->19
         13    >   ASSIGN                                                   !4, ~12
    7    14        NOP                                                      
         15        FAST_CONCAT                                      ~15     !4, '+can%27t+be+empty'
         16        ASSIGN_DIM                                               !2, !4
         17        OP_DATA                                                  ~15
    6    18      > JMP                                                      ->12
         19    >   FE_FREE                                                  $11
   10    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/akRoB
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        IS_EQUAL                                         ~1      !0, ''
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.52 ms | 1007 KiB | 15 Q