Bug #66926 [NEW]: Missing Information in translation
| From: | wako057 at gmail dot com | Date: | Tue, 18 Mar 2014 16:39:53 +0000 |
| Subject: | Bug #66926 [NEW]: Missing Information in translation | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-11082@lists.php.net to get a copy of this message | ||
From: wako057 at gmail dot com
Operating system: Debian
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Bug
Bug description:Missing Information in translation
Description:
------------
I've tested this issue on php 5.3.28 and php 5.5.10
When the parser found in class a method called as the class, insensitive
to the case, it generate a Strict Standard error.
But if it found the __construct first, at this moment no error is
raised.
With namespace the case doesn't happened at all.
Test script:
---------------
<?php
class Foo {
public function foo() {
echo 'ahaha';
}
function __construct() {
echo 'hihi';
}
}
Generate a: PHP Strict Standards: Redefining already defined
constructor for class Foo
BUT
<?php
class Foo {
function __construct() {
echo 'hihi';
}
public function foo() {
echo 'ahaha';
}
}
Don't
<?php
namespace Bar;
class Foo {
public function foo() {
echo 'ahaha';
}
function __construct() {
echo 'hihi';
}
}
new Foo();
Neither
Expected result:
----------------
When a __construct is present, no error should be raised
Actual result:
--------------
Strict Standards: Redefining already defined constructor for class Foo
in /var/www/tt.php on line 7
--
Edit bug report at https://bugs.php.net/bug.php?id=66926&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66926&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66926&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66926&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66926&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66926&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66926&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66926&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66926&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66926&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66926&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66926&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66926&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66926&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66926&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66926&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66926&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66926&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66926&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66926&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66926&r=mysqlcfg