3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = ['beans' => 23, 'peas' => null, 'carrots' => 17, 'turnips' => '', 'potatoes' => 58]; $result = array_filter($data, fn($e) => empty($e)); echo print_r($result, 1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hgZg8
function name:  (null)
number of ops:  13
compiled vars:  !0 = $data, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'array_filter'
          2        SEND_VAR                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          4        SEND_VAL                                                     ~3
          5        DO_ICALL                                             $4      
          6        ASSIGN                                                       !1, $4
    5     7        INIT_FCALL                                                   'print_r'
          8        SEND_VAR                                                     !1
          9        SEND_VAL                                                     1
         10        DO_ICALL                                             $6      
         11        ECHO                                                         $6
         12      > 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/hgZg8
function name:  {closure:/in/hgZg8:4}
number of ops:  4
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        ISSET_ISEMPTY_CV                                     ~1      !0
          2      > RETURN                                                       ~1
          3*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.15 ms | 1860 KiB | 15 Q