how to write this in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Chris T
    New Member
    • Jul 2011
    • 5

    how to write this in php

    Hello,
    I have a question, how to write this line which is in C++ ofc. using PHP:

    Code:
    #define setC(x,n) (x[n>>6]|=(1<<((n>>1)&31)))
    I know it's a C++ macro, and I will create function like that, but I can't translate the bitshift part.

    Regards,
    Chris
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    See http://www.php.net/manual/en/languag...rs.bitwise.php

    It is possible to do. Just takes some trial and error with php.

    Dan

    Comment

    Working...