Edit report at https://bugs.php.net/bug.php?id=30793&edit=1

 ID:                 30793
 Updated by:         s...@php.net
 Reported by:        jonas at datatal dot se
 Summary:            Abstract functions and default parameter
-Status:             Feedback
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Class/Object related
 Operating System:   *
 PHP Version:        *
-Assigned To:        andi
+Assigned To:        stas
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2012-02-25 00:35:19] s...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Seems to be working fine in 5.3.

------------------------------------------------------------------------
[2004-11-29 15:57:16] tony2...@php.net

>default parameter is still a parameter
right.
but providing default value for a parameter you're changing the number of 
required arguments.

------------------------------------------------------------------------
[2004-11-29 15:54:36] jonas at datatal dot se

I can agree on the second problem. But the first one should be valid (default 
parameter is still a parameter)

------------------------------------------------------------------------
[2004-11-27 11:40:03] tony2...@php.net

Well, personally I do not think such features could be accepted.
You get these errors because method signatures are different (number of 
required arguments and class hint differ), so this is well expected behaviour.

I'm leaving this report as feature request for Andi.

------------------------------------------------------------------------
[2004-11-15 13:59:28] jonas at datatal dot se

Another related problem.

have this function in the same abstract class:

/** Fill the object with the information fetched from the db */
abstract public static function Fill(ADORecordset $rs, DbClass $db);

Since all db classes extends the DbClass this should be valid:

(in the user class)
public static function Fill(ADORecordset $rs, User $usr)
{
  [...]
}

but it isnt. I get the following error:

Fatal error: Declaration of User::Fill() must be compatible with that of 
DbClass::Fill() in d:\projects\inetpub\WebUser\Classes\User.php on line 83

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


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

    https://bugs.php.net/bug.php?id=30793


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

Reply via email to