3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { private $f; public function test() { var_dump((bool)$this->f & 1); var_dump((bool)$this->f & 0); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JsL31
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   1

Class x:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JsL31
function name:  test
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'f'
          2        BOOL                                             ~1      ~0
          3        BW_AND                                           ~2      ~1, 1
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'var_dump'
          7        FETCH_OBJ_R                                      ~4      'f'
          8        BOOL                                             ~5      ~4
          9        BW_AND                                           ~6      ~5, 0
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
    7    12      > RETURN                                                   null

End of function test

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.8 ms | 1394 KiB | 15 Q