Date: 07/08/98
- Next message: jwalsh <email protected>: "[PHP-DEV] Bug #521: Variable Number Function Args"
- Previous message: rasmus: "[PHP-DEV] CVS update: php31/lib/regex"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: be <email protected>
Operating system: solaris 2.5.1
PHP version: 3.0 Final Release
PHP Bug Type: Misbehaving function
Bug description:
defining a function with reference variables
like this:
function funcname(&$parm) {
;
}
doesnt work inside classes. The following script documents this
(sorry i could not get it shorter)
<?php
class a {
function one(&$s) {
# see -------^
$s="bar";
}
function two() {
$s="foo";
$this->one($s);
# see -----^
print $s."\n";
$s="foo";
$this->one(&$s);
# see -----^
print $s."\n";
}
}
$o = new a;
$o->two();
?>
It should produce:
bar
bar
But it produces
foo
bar
I suspect this behaviour to cause a core dump under certain circumstances.
I assume this is a bug?
- Next message: jwalsh <email protected>: "[PHP-DEV] Bug #521: Variable Number Function Args"
- Previous message: rasmus: "[PHP-DEV] CVS update: php31/lib/regex"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

