3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = '0'; function isNonEmptyStr($var) { return is_string($var) && strlen($var) > 0; } var_dump(isNonEmptyString($var));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z6DX4
function name:  (null)
number of ops:  8
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '0'
    9     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL_BY_NAME                                       'isNonEmptyString'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function isnonemptystr:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/Z6DX4
function name:  isNonEmptyStr
number of ops:  8
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        TYPE_CHECK                                   64  ~1      !0
          2      > JMPZ_EX                                          ~1      ~1, ->6
          3    >   STRLEN                                           ~2      !0
          4        IS_SMALLER                                       ~3      0, ~2
          5        BOOL                                             ~1      ~3
          6    > > RETURN                                                   ~1
    7     7*     > RETURN                                                   null

End of function isnonemptystr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.48 ms | 1395 KiB | 15 Q