Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62877 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85136 invoked from network); 6 Sep 2012 21:30:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2012 21:30:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=markg85@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=markg85@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: markg85@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:45905] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/CE-03079-01619405 for ; Thu, 06 Sep 2012 17:30:57 -0400 Received: by lbbgp3 with SMTP id gp3so1541291lbb.29 for ; Thu, 06 Sep 2012 14:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=C3+MBGJcGI5R3vyZOWDU7AZgMd8Kio+AGo/puSArFCU=; b=K31HxgJO2DiomB9Nr0OFWr/M7CkucGnMJcANl9moBDM2tD+0dxJtVi1gglSgplrZpq aHkqmjSOkrnmHjw/LuK/XTpbf34cFDtZAGhjBTvLmgsNd6ZiMfJMie4XhVjDoPQ2eYvM adVgRi9RbaW02YQ2z+RbhN6paN2zbQhlwOlLv6ORC/7gAuzIIxq8eKSx6A3DJ2g/e+Fd 26OzhpqeTYbBR8HLDvbeFKUBuvGug2FJo9JE2fmewf5ZIRr5hPTIhZJt6SP6UqSbfk5u oNm/s0V+fz/HELYq1EMXLddkfCmr+t2zcV6fatzEmW+ZkbTA6PzZWHLUIZeWsI6m7VCx OaPQ== Received: by 10.152.132.233 with SMTP id ox9mr3225159lab.25.1346967053283; Thu, 06 Sep 2012 14:30:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.92.9 with HTTP; Thu, 6 Sep 2012 14:30:33 -0700 (PDT) Date: Thu, 6 Sep 2012 23:30:33 +0200 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Why are the PHP namespaces different compared to C++? From: markg85@gmail.com (Mark) Hi, I was just using the PHP namespaces for the first time and noticed a difference that i really didn't expect. (No, i won't start complaining about the slash based namespace). In C++ when you type: using std; Then you can use all methods/classes/whatever is defined in std without typing std. so: std::cout becomes just cout. In PHP that's a bit different. Lets take this as an example: ================================= namespacetst.php