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

  • Home
  • SEARCH
  • 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 8462657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:13:38+00:00 2026-06-10T14:13:38+00:00

I have a function a. That is re used in many times without any

  • 0

I have a function a. That is re used in many times without any problem. But now i cant call the function.This is my function

function a($a,&$b){
        // functions code here
        }

I calling function a like this.

a(3,null);

Whats the error with my code?

  • 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-06-10T14:13:40+00:00Added an answer on June 10, 2026 at 2:13 pm

    You’ll see that you get an error message along the lines of

    PHP Fatal error:  Only variables can be passed by reference in SOMETHING.php on line xxx
    

    This is because your function is saying that its second parameter is a reference (i.e. &$b) and this requires that you pass a variable. You are actually passing null which is not a variable, hence the problem.

    If you require the second parameter as a reference (and one way of fixing this might be to remove that requirement) pass along a variable that is set to null. E.g.

    $c = null;
    a(3, $c);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here i have one function which is call many times in one application this
I have used the Attach to process function within VS 2008 many times, but
I have a function that I have used a bunch of times in various
Right now I have a function, in a class that is used to listen
I am using colorbox which I have used many times for different clients, but
I have a function that is used to creating a directory. It uses CreateDirectoryA()
I have one javascript function that used to display the menu and content in
I have a function in java script, that I used it to take the
I have a function that takes another function as a parameter. Something like this
I am working on this PHP project and I have many places that an

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.