3v4l.org

run code in 300+ PHP versions simultaneously
<?php const general = 1; const verified = 2; const premier = 4; const boost = 8; $status = 10; function isEnrolled(&$status) { return ($status & boost) == boost; } print_r(isEnrolled());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MC64p
function name:  (null)
number of ops:  11
compiled vars:  !0 = $status
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'general', 1
    4     1        DECLARE_CONST                                            'verified', 2
    5     2        DECLARE_CONST                                            'premier', 4
    6     3        DECLARE_CONST                                            'boost', 8
    8     4        ASSIGN                                                   !0, 10
   15     5        INIT_FCALL                                               'print_r'
          6        INIT_FCALL                                               'isenrolled'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function isenrolled:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MC64p
function name:  isEnrolled
number of ops:  7
compiled vars:  !0 = $status
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        FETCH_CONSTANT                                   ~1      'boost'
          2        BW_AND                                           ~2      !0, ~1
          3        FETCH_CONSTANT                                   ~3      'boost'
          4        IS_EQUAL                                         ~4      ~2, ~3
          5      > RETURN                                                   ~4
   13     6*     > RETURN                                                   null

End of function isenrolled

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.59 ms | 1402 KiB | 16 Q