3v4l.org

run code in 300+ PHP versions simultaneously
<?php function friskamax_is_not_empty_string( $var ) { return $var !== ''; } function mbake_sanitize_int( $value ) { if ( friskamax_is_not_empty_string( $value ) ) { return ( int ) $value; } } echo mbake_sanitize_int( '' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbJrs
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'mbake_sanitize_int'
          1        SEND_VAL                                                 ''
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function friskamax_is_not_empty_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbJrs
function name:  friskamax_is_not_empty_string
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_NOT_IDENTICAL                                 ~1      !0, ''
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function friskamax_is_not_empty_string

Function mbake_sanitize_int:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbJrs
function name:  mbake_sanitize_int
number of ops:  8
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'friskamax_is_not_empty_string'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $1      
          4      > JMPZ                                                     $1, ->7
   10     5    >   CAST                                          4  ~2      !0
          6      > RETURN                                                   ~2
   13     7    > > RETURN                                                   null

End of function mbake_sanitize_int

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.57 ms | 1398 KiB | 15 Q