3v4l.org

run code in 500+ PHP versions simultaneously
<?php function is_blank(&$variable) { return (bool) !(isset($variable) AND (!empty($variable) OR is_numeric($variable) OR $variable === false)); } $empty_var = ''; $var = 'hello'; $num = 0.0; $bool = false; $bool2 = true; var_dump(is_blank($unexistent), is_blank($empty_var), is_blank($var), is_blank($num), is_blank($bool), is_blank($bool2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZcCDu
function name:  (null)
number of ops:  32
compiled vars:  !0 = $empty_var, !1 = $var, !2 = $num, !3 = $bool, !4 = $bool2, !5 = $unexistent
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, ''
    8     1        ASSIGN                                                       !1, 'hello'
    9     2        ASSIGN                                                       !2, 0
   10     3        ASSIGN                                                       !3, <false>
   11     4        ASSIGN                                                       !4, <true>
   13     5        INIT_FCALL                                                   'var_dump'
          6        INIT_FCALL                                                   'is_blank'
          7        SEND_REF                                                     !5
          8        DO_FCALL                                          0  $11     
          9        SEND_VAR                                                     $11
         10        INIT_FCALL                                                   'is_blank'
         11        SEND_REF                                                     !0
         12        DO_FCALL                                          0  $12     
         13        SEND_VAR                                                     $12
         14        INIT_FCALL                                                   'is_blank'
         15        SEND_REF                                                     !1
         16        DO_FCALL                                          0  $13     
         17        SEND_VAR                                                     $13
         18        INIT_FCALL                                                   'is_blank'
         19        SEND_REF                                                     !2
         20        DO_FCALL                                          0  $14     
         21        SEND_VAR                                                     $14
         22        INIT_FCALL                                                   'is_blank'
         23        SEND_REF                                                     !3
         24        DO_FCALL                                          0  $15     
         25        SEND_VAR                                                     $15
         26        INIT_FCALL                                                   'is_blank'
         27        SEND_REF                                                     !4
         28        DO_FCALL                                          0  $16     
         29        SEND_VAR                                                     $16
         30        DO_ICALL                                                     
         31      > RETURN                                                       1

Function is_blank:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 8
Branch analysis from position: 12
filename:       /in/ZcCDu
function name:  is_blank
number of ops:  16
compiled vars:  !0 = $variable
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ISSET_ISEMPTY_CV                                     ~1      !0
          2      > JMPZ_EX                                              ~1      ~1, ->12
          3    >   ISSET_ISEMPTY_CV                                     ~2      !0
          4        BOOL_NOT                                             ~3      ~2
          5      > JMPNZ_EX                                             ~3      ~3, ->8
          6    >   FRAMELESS_ICALL_1                is_numeric          ~4      !0
          7        BOOL                                                 ~3      ~4
          8    > > JMPNZ_EX                                             ~3      ~3, ->11
          9    >   TYPE_CHECK                                        4  ~5      !0
         10        BOOL                                                 ~3      ~5
         11    >   BOOL                                                 ~1      ~3
         12    >   BOOL_NOT                                             ~6      ~1
         13        BOOL                                                 ~7      ~6
         14      > RETURN                                                       ~7
    5    15*     > RETURN                                                       null

End of function is_blank

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.41 ms | 2244 KiB | 20 Q