3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lambda_filter_empty($entry) { return ($entry !== ''); } $test = array( 'country_id' => '1', 'state' => '', 'city' => '', 'address1' => '', ); $result = array_filter($test, "lambda_filter_empty"); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PrKpb
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'lambda_filter_empty'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   15     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function lambda_filter_empty

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.43 ms | 1394 KiB | 17 Q