Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60106 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76933 invoked from network); 17 Apr 2012 19:52:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2012 19:52:09 -0000 Authentication-Results: pb1.pair.com header.from=ralph@ralphschindler.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ralph@ralphschindler.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ralphschindler.com from 209.85.160.170 cause and error) X-PHP-List-Original-Sender: ralph@ralphschindler.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:65204] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/25-03996-7E9CD8F4 for ; Tue, 17 Apr 2012 15:52:08 -0400 Received: by ghbg2 with SMTP id g2so3745979ghb.29 for ; Tue, 17 Apr 2012 12:52:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=zhkxh1UUtxQ//k3lOVEPYSCOjSvbbLeBU2TP/eT1JhQ=; b=CrgkQRZKsvP9BM+EWqk833BrAGS+bceKoRJhqT4iGMWHKTsa9l3oZgbpPDdzgE0+Ds joNGpqXgzKyZ0r0Y88l6dxiCicPnmkaRKmJsMZAI+sGGGGN/qW0Lgjh0U88RPeiUFdbY HYhe34H1wgu83ueCPQ0iJXD/lXbhqalgkYnzIHK7rt02wv5NDFfn20eKMPuXx9+dJQ9e y2CeFEn7XDdSOA1SZxp84aKjxhGhqIQGAsdUI19CRm2sZ9SoSMERs3aIB6ZEDJdcmJ6Q amkNuaLi1RgB3VGybUrBM1herLpIzL351OCmJb/tAeB4dgQrAuz12AL99tm3dh6ElW09 ZNzg== Received: by 10.60.30.3 with SMTP id o3mr23467994oeh.9.1334692323269; Tue, 17 Apr 2012 12:52:03 -0700 (PDT) Received: from ralph-mac.local (ip174-73-14-247.no.no.cox.net. [174.73.14.247]) by mx.google.com with ESMTPS id s8sm19474937oec.1.2012.04.17.12.52.02 (version=SSLv3 cipher=OTHER); Tue, 17 Apr 2012 12:52:02 -0700 (PDT) Message-ID: <4F8DC9E1.5020909@ralphschindler.com> Date: Tue, 17 Apr 2012 14:52:01 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <4F89D4F1.8070009@ralphschindler.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQk4ga0Gf2JhQl1rXBm9eri+2LzVPSTElRUTdaXjCsHs/aKfZnfFuOEKDkF1QGMCa6u1/KFe Subject: Re: [PHP-DEV] New Feature: Fully qualified class name resolution as scalar with class keyword From: ralph@ralphschindler.com (Ralph Schindler) > Would changing the definition for class_name_scalar be sufficient? > > class_name_scalar: > class_name { zend_resolve_class_name(&$1, ZEND_FETCH_CLASS_GLOBAL, > 1 TSRMLS_CC); $$ = $1; } > ; > > To my eye, this is the least surprising syntax. As far as I can tell, this rule will not compile as it conflicts with other rules, namely around the namespace implementation rules. Besides that though, an original design goal was to implement it closer to how other languages solve the same-ish problem. This solution is somewhat in line with Java (.class) and Ruby (.class.name), Python actually uses the same but instead of .class, they use .__class__.__name__ -ralph