ID: 38529
Updated by: [EMAIL PROTECTED]
Reported By: suneelbadola at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux/Windows
PHP Version: 5.1.5
New Comment:
Function overloading is not supported and never going to be, since PHP
is weakly typed language.
Previous Comments:
------------------------------------------------------------------------
[2006-08-21 04:18:03] suneelbadola at yahoo dot com
Description:
------------
The constructor over loading is not allowed in PHP however for being
OOPS based language it should.
Reproduce code:
---------------
class PDF extends FPDF
{
public function __construct($one){
echo "one";
}
public function __construct($one,$two){
echo "two";
}
public function __construct(){
echo "blank";
}
}
Expected result:
----------------
it should allow us contructor overloading.
Actual result:
--------------
error: can not redeclare function.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38529&edit=1