3v4l.org

run code in 300+ 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 = 14
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 10
Branch analysis from position: 14
filename:       /in/ZcCDu
function name:  is_blank
number of ops:  18
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, ->14
          3    >   ISSET_ISEMPTY_CV                                 ~2      !0
          4        BOOL_NOT                                         ~3      ~2
          5      > JMPNZ_EX                                         ~3      ~3, ->10
          6    >   INIT_FCALL                                               'is_numeric'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        BOOL                                             ~3      $4
         10    > > JMPNZ_EX                                         ~3      ~3, ->13
         11    >   TYPE_CHECK                                    4  ~5      !0
         12        BOOL                                             ~3      ~5
         13    >   BOOL                                             ~1      ~3
         14    >   BOOL_NOT                                         ~6      ~1
         15        BOOL                                             ~7      ~6
         16      > RETURN                                                   ~7
    5    17*     > RETURN                                                   null

End of function is_blank

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
287.79 ms | 1013 KiB | 21 Q