PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

PHP pass by reference

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP pass by reference

    We are getting ready to migrate our installation of PHP to 5.4 . In the PHP migration notes, it says that 'call-time pass by reference' has been removed in 5.4, and using it will raise a fatal error. We find that in the Zoom Indexer module search.php, the 'replace' function is being called with a pass by reference (&$str). Is it not being called, or am I misinterpreting the PHP documentation? Will this have a negative effect on the search capability of the application?

  • #2
    There should not be an issue with Zoom's search.php script. As the PHP documentation states,

    "There is no reference sign on a function call - only on function definitions. Function definitions alone are enough to correctly pass the argument by reference."

    PHP is removing pass by reference when you call a function at run time. If however, you define pass by reference in the function definition (as Zoom does) it will allow pass by reference.

    Comment

    Working...
    X