|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-09-22 21:11 UTC] v dot guth at owlient dot eu
Description:
------------
This PHP code generates a segmentation fault.
I would expect an error message such as :
Fatal error: Declaration of B::c() must be compatible with A::c() in /tmp/test.php on line 13
Test script:
---------------
<?php
abstract class A {
abstract public function c();
}
class B extends A {
public function c(...$list) {
}
}
?>
Expected result:
----------------
A nice error message:
Fatal error: Declaration of B::c() must be compatible with A::c() in /tmp/test.php on line 13
Actual result:
--------------
A segmentation fault:
vincent@abricow:/var/www$ php /tmp/test.php
Erreur de segmentation (core dumped)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
<?php class A { public function c() { } } class B extends A { public function c(...$list) { } } ?> ... does not work either.