3v4l.org

run code in 300+ PHP versions simultaneously
<?php $isEmpty = function($row) { return 0 === count(array_filter($row)); }; $array = ['', '', '', '', '']; var_dump($isEmpty($array)); $array = ['', '', null, '', 0]; var_dump($isEmpty($array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kpb1E
function name:  (null)
number of ops:  17
compiled vars:  !0 = $isEmpty, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fkpb1E%3A2%240'
          1        ASSIGN                                                   !0, ~2
    6     2        ASSIGN                                                   !1, <array>
    7     3        INIT_FCALL                                               'var_dump'
          4        INIT_DYNAMIC_CALL                                        !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
    9     9        ASSIGN                                                   !1, <array>
   10    10        INIT_FCALL                                               'var_dump'
         11        INIT_DYNAMIC_CALL                                        !0
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fkpb1E%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kpb1E
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        COUNT                                            ~2      $1
          5        IS_IDENTICAL                                     ~3      ~2, 0
          6      > RETURN                                                   ~3
    4     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fkpb1E%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.59 ms | 1395 KiB | 17 Q