ID:               14221
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Analyzed
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: ANY
 PHP Version:      4.2.0-dev
 New Comment:

If this bug report is related is not important.
Infinate recusive call is programmer's fault.

I think PHP should raise, error for
<?php
class foo {
  function bar() {}
  function bar() {}
}

There are some issues for preventing multiple method definition.
Derick's patch does not work well, I've 
posted another patch, but it seems there is some problem. 
(i.e. parent class entry may not be defined under some condition)

Brad's proposal sounds nice.
See recent php-dev and zend-engine2 messages.



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

[2002-04-01 22:09:03] [EMAIL PROTECTED]

It is related, but that's certainly not immediately clear from the
problem description.

Effectively what is happening is that there is infinite recursion in my
code example given (which causes the segfault). The reason I ever
believed that this was valid code was that I incorrectly believed that
it was valid to have multiple member functions with the same name, but
different parameters. The reason I believed this was because PHP
previously happily accepted this - i.e. it allowed a class to have
multiple member functions with the same name.

In essence, the code is invalid, but PHP's parsing behaviour before
would make it very easy to believe that it was valid code.

The recent patch (I think it is from Derick) would definitely have
prevented me from ever have believing that it was valid code, thus it
would have prevented this problem from occurring.

It is for this reason that I am quite certain that (assuming the update
from #16265 does what it says it does) that this problem is now
resolved, and I am also very grateful for everyone's help.

Cheers,
Nick.

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

[2002-04-01 21:54:13] [EMAIL PROTECTED]

In fact, this bug is not realated to multiple method definition bug.

Stauts => Analyzed.



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

[2002-04-01 21:51:50] [EMAIL PROTECTED]

It seems this isnot related to http://bugs.php.net/bug.php?id=16265

Since this segfaults
<?php
        error_reporting (E_ALL);

        class test {
                var $currentField;
                function setCurrentField($field_name) {
                        $this->currentField = $field_name;
                }
                function getValue() {
                        return $this->getValue($this->currentField);
                }
        }

        $frm = new test;

        $frm->setCurrentField("blah");  
        print $frm->getValue();
        
?>


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

[2002-04-01 21:39:36] [EMAIL PROTECTED]

http://bugs.php.net/bug.php?id=16265
should be reopenned. (I just did)


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

[2002-04-01 19:16:29] [EMAIL PROTECTED]

This looks to have been resolved here:
http://bugs.php.net/bug.php?id=16265
If this is correct, can this report be closed?

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

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/14221

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

Reply via email to