Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80154 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28935 invoked from network); 4 Jan 2015 17:31:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2015 17:31:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:36716] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/C2-02442-FF879A45 for ; Sun, 04 Jan 2015 12:31:44 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id A8E31EA085; Sun, 4 Jan 2015 17:31:39 +0000 (GMT) Date: Sun, 4 Jan 2015 17:31:39 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Stanislav Malyshev cc: Andrea Faulds , PHP Internals In-Reply-To: <54A466CB.9020400@gmail.com> Message-ID: References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> <54A466CB.9020400@gmail.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: derick@php.net (Derick Rethans) On Wed, 31 Dec 2014, Stanislav Malyshev wrote: > > The issue is the class names though. E.g. see: > https://github.com/ralphschindler/zf2-db/blob/master/research/ColumnType/Integer.php That's in a namespace, so it's not actually Integer, but Zend\Db\Metadata\Type\Integer > and: > > https://github.com/canaydogan/ObjectValidator/blob/master/src/ObjectValidator/Validator/Int.php That's in a namespace, so it's not actually Int, but ObjectValidator\Validator\Int > > These are uppercase "I", but class names are not case-sensitive... So > we'll need to figure it out. Unfortunately, looking at github, > disallowing "class Int" looks like pretty bad idea. Sorry, but for years we have this in the manual (http://php.net/manual/en/userlandnaming.rules.php): "PHP owns the top-level namespace but tries to find decent descriptive names and avoid any obvious clashes." With namespaces (as in your above examples), this is already moot. I think it's perfectly acceptable that PHP makes a built-in type a reserved word. I would certainly not change it to PHPInt to "avoid any obvious clashes". cheers, Derick