3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 4; $b = 1; $res1 = ($a and $b); $res2 = $a & $b; $res3 = ($a or $b); $res4 = $a | $b; var_dump($res1);//the res1 is 4,but the manual describes the result to be a bool type. var_dump($res2); var_dump($res3); var_dump($res4);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 4
filename:       /in/2J1kI
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $b, !2 = $res1, !3 = $res2, !4 = $res3, !5 = $res4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 4
    3     1        ASSIGN                                                   !1, 1
    4     2      > JMPZ_EX                                          ~8      !0, ->4
          3    >   BOOL                                             ~8      !1
          4    >   ASSIGN                                                   !2, ~8
    5     5        BW_AND                                           ~10     !0, !1
          6        ASSIGN                                                   !3, ~10
    6     7      > JMPNZ_EX                                         ~12     !0, ->9
          8    >   BOOL                                             ~12     !1
          9    >   ASSIGN                                                   !4, ~12
    7    10        BW_OR                                            ~14     !0, !1
         11        ASSIGN                                                   !5, ~14
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
    9    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   10    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                                 
   11    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !5
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.19 ms | 998 KiB | 14 Q