php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55809 PHP 5.3.5-1ubuntu7.2ppa1~natty
Submitted: 2011-09-28 20:31 UTC Modified: 2011-09-28 23:26 UTC
From: petr at bugyik dot cz Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.3SVN-2011-09-28 (SVN) OS: ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 + 16 = ?
Subscribe to this entry?

 
 [2011-09-28 20:31 UTC] petr at bugyik dot cz
Description:
------------
Creating an instance with string 
(http://www.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.new) 
not accepted actual namespace.

Test script:
---------------
http://goo.gl/wh6U4

Expected result:
----------------
No error

Actual result:
--------------
[o5@sandy]$ php Foo.php 
PHP Fatal error:  Class 'Bar' not found in /home/o5/www/test/bug/Foo.php on line 
11
PHP Stack trace:
PHP   1. {main}() /home/o5/www/test/bug/Foo.php:0
PHP   2. Foo\Foo->__construct() /home/o5/www/test/bug/Foo.php:15

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-28 23:26 UTC] cataphract@php.net
-Status: Open +Status: Bogus
 [2011-09-28 23:26 UTC] cataphract@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

http://php.net/manual/en/language.namespaces.dynamic.php
 [2011-09-29 05:36 UTC] petr at bugyik dot cz
I thought it was a bug, because the creation of the classic instances using new 
Bar() works (without complete fully qualified name).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 17:01:30 2024 UTC