Doc #65246 [NEW]: Discrepancy between documentation and actual workings
| From: | bernardo at thebigb dot nl | Date: | Thu, 11 Jul 2013 19:52:27 +0000 |
| Subject: | Doc #65246 [NEW]: Discrepancy between documentation and actual workings | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-10065@lists.php.net to get a copy of this message | ||
From: bernardo at thebigb dot nl
Operating system: Debian GNU/Linux 7 (wheezy)
PHP version: 5.3.27
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Discrepancy between documentation and actual workings
Description:
------------
The actual PHP version I am using is PHP 5.4.4-14+deb7u2.
The issue is regarding this doc page:
http://www.php.net/manual/en/language.oop5.interfaces.php
More specifically the statement: "Note: A class cannot implement two
interfaces
that share function names, since it would cause ambiguity."
This statement is incorrect, as I have discovered in my PHP environment
that the
test below executes without errors or warnings.
I tracked the change in the documented behavior down to the following
commit:
https://github.com/php/php-
src/commit/31ef559712dae57046b6377f07634ad57f9d88cf#Zend/zend_compile.c
That would mean that the note is not relevant anymore since php-5.3.9.
Test script:
---------------
interface Foo
{
public function sameMethod();
}
interface Bar
{
public function sameMethod();
}
class Baz implements Foo, Bar
{
public function sameMethod()
{
echo 'Something';
}
}
$obj = new Baz();
$obj->sameMethod();
--
Edit bug report at https://bugs.php.net/bug.php?id=65246&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65246&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65246&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65246&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65246&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65246&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65246&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65246&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65246&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65246&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65246&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65246&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65246&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65246&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65246&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65246&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65246&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65246&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65246&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65246&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65246&r=mysqlcfg