3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isArrayNotEmpty($data): bool{ if(! is_array($data)) return false; return ! empty($data); } var_dump(isArrayNotEmpty([])); var_dump(isArrayNotEmpty(false)); var_dump(isArrayNotEmpty(null)); var_dump(isArrayNotEmpty(0)); var_dump(isArrayNotEmpty('')); var_dump(isArrayNotEmpty([1,2,3]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/splKg
function name:  (null)
number of ops:  37
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isarraynotempty'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'isarraynotempty'
          8        SEND_VAL                                                 <false>
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'isarraynotempty'
         14        SEND_VAL                                                 null
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'isarraynotempty'
         20        SEND_VAL                                                 0
         21        DO_FCALL                                      0  $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                                 
   12    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'isarraynotempty'
         26        SEND_VAL                                                 ''
         27        DO_FCALL                                      0  $8      
         28        SEND_VAR                                                 $8
         29        DO_ICALL                                                 
   13    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'isarraynotempty'
         32        SEND_VAL                                                 <array>
         33        DO_FCALL                                      0  $10     
         34        SEND_VAR                                                 $10
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Function isarraynotempty:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/splKg
function name:  isArrayNotEmpty
number of ops:  11
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        TYPE_CHECK                                  128  ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->5
          4    > > RETURN                                                   <false>
    5     5    >   ISSET_ISEMPTY_CV                                 ~3      !0
          6        BOOL_NOT                                         ~4      ~3
          7        VERIFY_RETURN_TYPE                                       ~4
          8      > RETURN                                                   ~4
    6     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function isarraynotempty

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.78 ms | 1403 KiB | 21 Q