3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a() { print("A"); return true; } function b() { print("B"); return false; } var_dump((boolean)(intval(a()) | intval(b()))); var_dump((boolean)(intval(a()) & intval(b())));
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/uNuu6
function name:  (null)
number of ops:  33
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
   7     1        NOP                                                      
  11     2        INIT_FCALL                                               'var_dump'
         3        INIT_FCALL                                               'intval'
         4        INIT_FCALL                                               'a'
         5        DO_FCALL                                      0  $0      
         6        SEND_VAR                                                 $0
         7        DO_ICALL                                         $1      
         8        INIT_FCALL                                               'intval'
         9        INIT_FCALL                                               'b'
        10        DO_FCALL                                      0  $2      
        11        SEND_VAR                                                 $2
        12        DO_ICALL                                         $3      
        13        BW_OR                                            ~4      $1, $3
        14        CAST                                         13  ~5      ~4
        15        SEND_VAL                                                 ~5
        16        DO_ICALL                                                 
  12    17        INIT_FCALL                                               'var_dump'
        18        INIT_FCALL                                               'intval'
        19        INIT_FCALL                                               'a'
        20        DO_FCALL                                      0  $7      
        21        SEND_VAR                                                 $7
        22        DO_ICALL                                         $8      
        23        INIT_FCALL                                               'intval'
        24        INIT_FCALL                                               'b'
        25        DO_FCALL                                      0  $9      
        26        SEND_VAR                                                 $9
        27        DO_ICALL                                         $10     
        28        BW_AND                                           ~11     $8, $10
        29        CAST                                         13  ~12     ~11
        30        SEND_VAL                                                 ~12
        31        DO_ICALL                                                 
        32      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/uNuu6
function name:  a
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ECHO                                                     'A'
   4     1      > RETURN                                                   <true>
   5     2*     > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/uNuu6
function name:  b
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   8     0  E >   ECHO                                                     'B'
   9     1      > RETURN                                                   <false>
  10     2*     > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 7.2.0