ID:               15518
 Updated by:       [EMAIL PROTECTED]
-Reported By:      [EMAIL PROTECTED]
+Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Windows 2000 Advanced Server SP2
 PHP Version:      4.1.1
 New Comment:

Sorry, no overloading in php, I'm afraid.


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

[2002-02-12 05:27:59] [EMAIL PROTECTED]

<?

class test
{
function getlist($filename,$template)
{
  echo $filename.$template."<br>";
}

function getlist($filename)
{
  echo $this->getlist($filename,"<default>");
}
}

$temp = new test;
$temp->getlist("test1"); // wrecks
$temp->getlist("test1","test2"); // wrecks
$temp->getlist("test1","test2","test3"); // wrecks
$temp->getlist("test1","test2","test3","test4"); // wrecks

?>

In this case php will cause a general protection fault.

If you comment out this line it works :
echo $this->getlist($filename,"<default>");

So the bug is if you want to access overloaded member methods.

The solution would be to deny function overloading inside and outside
classes.

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


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

Reply via email to