php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #15937 Call-time pass-by-reference has been deprecated
Submitted: 2002-03-07 13:22 UTC Modified: 2002-03-08 03:55 UTC
From: nohn@php.net Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.0.5 OS: SuSE Linux 6.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nohn@php.net
New email:
PHP Version: OS:

 

 [2002-03-07 13:22 UTC] nohn@php.net
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of strlen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in <xxx> line 653

To what shall I modify the declartion of strlen? It's not documented anywhere...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-07 13:31 UTC] cynic@php.net
there's nothing wrong with strlen(). why do you pass it the argument by reference? strlen() doesn't modify it, so it's completely useless.

this PR is bogus.


 [2002-03-07 14:05 UTC] nohn@php.net
reopened this bug.

the reason for me to use the call-by-reference is performance...

 [2002-03-07 14:07 UTC] derick@php.net
Performance is of no concern here. If a function doesn't modify a var, it wont copy it. As strlen() doesn't modify the value, it is not copied, and no performance is lost.

Making this bogus again.
 [2002-03-07 14:13 UTC] eschmid@php.net
Sebastian, please make a performance comparison. If a by-reference is faster, so make a note in the docs and mark this error as deleted.
 [2002-03-08 03:55 UTC] cynic@php.net
Egon, I don't know about builtin functions, but passing arguments by reference is *much* slower in userland functions.
I don't see a reason it should be any different with builtin ones.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 16:01:36 2025 UTC