php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15977 Function with passing by reference crash if passing by value
Submitted: 2002-03-09 19:15 UTC Modified: 2002-03-10 01:19 UTC
From: wawan at sega dot gatra dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.1.1 OS: Linux
Private report: No CVE-ID: None
 [2002-03-09 19:15 UTC] wawan at sega dot gatra dot com
This is very weird, as my backgroud is delphi/pascal, function with passing by reference is efficient for string parameter. PHP supports this (?), but if we forget passing with value, (i think) compiler is crash, nothing shown in the screen, even error_reporting set E_ALL. Let's see modified sample from manual:

function foo (&$var)
{
	$var++;
}

foo(5);

Any clue ? TIA.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-09 19:29 UTC] sniper@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-03-09 19:56 UTC] wawan at sega dot gatra dot com
I'm not asking for support, but PHP scripting engine should display something informational, not just blank, really blank (0 byte in return), just like a blackhole compiler.
 [2002-03-10 01:19 UTC] mfischer@php.net
When I test your example I get

'Fatal error: Only variables can be passed by reference in - on line 2'
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC