Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 916789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:06:16+00:00 2026-05-15T18:06:16+00:00

Finding the answer to this is turning out to be much more difficult than

  • 0

Finding the answer to this is turning out to be much more difficult than I would have thought. Since I don’t have a clue what you’d call this, it’s hard to run a Google search since it will ignore those characters.

I tried browsing the PHP Assignment Operators page, and even the other operators pages, and found nothing that told me exactly what they do. I don’t just want to guess based on the single function I have that uses it. So what exactly do the ‘&=’ and ‘=&’ operators do?

All I know is it sets a variable, which would be the ‘=’ part, so I really need to know what the ‘&’ part is doing.

Please don’t say the obvious; I need someone to explain exactly what they do. I know one of them is ‘bitwise’, but that doesn’t mean anything to me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:06:17+00:00Added an answer on May 15, 2026 at 6:06 pm

    =& assigns by reference

    $a = 1;
    $b =& $a;
    $a++;
    echo $b; // 2
    

    From PHP Manual on References:

    References in PHP are a means to access the same variable content by different names.


    &= is a bitwise AND assignment

    $a = 1;
    $a &= 1; // is the same as
    $a = $a & 1;
    echo $a; // 1
    

    From Wikipedia on Bitwise AND:

    A bitwise AND takes two binary representations of equal length and performs the logical AND operation on each pair of corresponding bits. In each pair, the result is 1 if the first bit is 1 AND the second bit is 1. Otherwise, the result is 0. For example:

        0101
    AND 0011
      = 0001
    

    EDIT: For a practical example on bitwise operations, see my answer to Bitwise Operations in PHP

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know why I am having difficulties finding an answer for this, but
I have read all threads about this without finding any answer to my problem.
I've searched for the answer to this question, and the answers I'm finding don't
This question may have been asked before, but I had trouble finding an answer,
I'm having trouble finding a clear answer to this question so I thought I'd
I have tried finding an answer to this problem and in every post I
This question seems easy but for some reason I have trouble finding the answer.
I'm having trouble finding a good answer to this. For some reason I thought
This might be one of the more difficult questions I've asked, but I have
I have searched for the answer to this and the reason I'm not finding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.