ID:               21600
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Critical
 Bug Type:         Scripting Engine problem
 Operating System: Redhat 7.3, 8, W2k server
 PHP Version:      4.3.0, 5.0.0
 New Comment:

The tests/lang/bug21600.phpt fails for me and I have 
bison 1.28..



Previous Comments:
------------------------------------------------------------------------

[2003-02-02 15:42:53] [EMAIL PROTECTED]

tests/lang/bug21600.phpt also failed on W2k server with latest win32
snap:

---- EXPECTED OUTPUT
array(1) {
  ["foo"]=>
  string(4) "test"
}
array(1) {
  ["foo"]=>
  string(4) "test"
}
---- ACTUAL OUTPUT
array(1) {
  ["foo"]=>
  &string(4) "test"
}
array(1) {
  ["foo"]=>
  string(4) "test"
}
---- FAILED

------------------------------------------------------------------------

[2003-01-31 10:52:23] [EMAIL PROTECTED]

I noticed this issue has something to do with the version of bison used
in a build.

Below is just my assumption:

1.28 => works
1.35 => works
1.75 => doesn't work
1.875 => ???




------------------------------------------------------------------------

[2003-01-23 16:44:49] [EMAIL PROTECTED]

Here is a simular problem - it seem to be a problem with referencing to
values from functions that not themselfs return reference.

<?php

class Person {

    var $name;

    function Person($name) {
        $this->name = $name;
        $wiefewfjwefjwefwef =& $this->getName(); // <-- this line
destroys $this->name and eventually crashes apache+php
    }
    
    function /*&*/ getName() {
        return $this->name;
    }
    
}

$kent =& new Person('Kent');

echo '<pre>'; print_r($kent); echo '</pre>';

echo '<p><b>PersonName: "' . $kent->getName() . '"</b></p>';


?>

------------------------------------------------------------------------

[2003-01-14 00:52:07] [EMAIL PROTECTED]

update version

------------------------------------------------------------------------

[2003-01-13 19:42:44] [EMAIL PROTECTED]

I'm marking this critical because the provided script works fine on the
previous released versions.


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/21600

-- 
Edit this bug report at http://bugs.php.net/?id=21600&edit=1

Reply via email to