3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getBitmask($value, $bitvalue){ return (decbin($value) & $bitvalue); } function isBidMarkedDeleted($value) { if (getBitmask($value, 8) == 8) { return true; } return false; } function isAskMarkedDeleted($value) { if (getBitmask($value, 4) == 4) { return true; } return false; } var_dump(isBidMarkedDeleted(11136)); var_dump(isAskMarkedDeleted(896));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/isajT
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isbidmarkeddeleted'
          2        SEND_VAL                                                 11136
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   23     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'isaskmarkeddeleted'
          8        SEND_VAL                                                 896
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function getbitmask:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/isajT
function name:  getBitmask
number of ops:  8
compiled vars:  !0 = $value, !1 = $bitvalue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        INIT_FCALL                                               'decbin'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        BW_AND                                           ~3      !1, $2
          6      > RETURN                                                   ~3
    4     7*     > RETURN                                                   null

End of function getbitmask

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

End of function isbidmarkeddeleted

Function isaskmarkeddeleted:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/isajT
function name:  isAskMarkedDeleted
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        INIT_FCALL                                               'getbitmask'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 4
          4        DO_FCALL                                      0  $1      
          5        IS_EQUAL                                                 $1, 4
          6      > JMPZ                                                     ~2, ->8
   17     7    > > RETURN                                                   <true>
   19     8    > > RETURN                                                   <false>
   20     9*     > RETURN                                                   null

End of function isaskmarkeddeleted

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.71 ms | 1394 KiB | 21 Q