Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88480 invoked from network); 27 Feb 2013 14:54:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2013 14:54:27 -0000 Authentication-Results: pb1.pair.com header.from=cryptocompress@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cryptocompress@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.181 as permitted sender) X-PHP-List-Original-Sender: cryptocompress@googlemail.com X-Host-Fingerprint: 209.85.215.181 mail-ea0-f181.google.com Received: from [209.85.215.181] ([209.85.215.181:49585] helo=mail-ea0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/20-20700-12E1E215 for ; Wed, 27 Feb 2013 09:54:26 -0500 Received: by mail-ea0-f181.google.com with SMTP id i13so50083eaa.26 for ; Wed, 27 Feb 2013 06:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type; bh=+52J2RlqqqaNkcjGEqp5gwkbZu4YrS4BtQiMwHOQrgk=; b=TBxGkKgNwgwEFbag+qucrkuxhVRAKpLRvRTWaI0gjOEtkmUuIfky81XZ0lvmpBJVV5 rXwrJNets9E27yUG9t6j7En/ITebk4UVq/yNKqzDPb+Ei7fRzEsNMA6bmsI6ZE+NyIED 6oD5fnX7lUvQyPMZ8ERiZdBAVlqR951/aLr4PvtggJx8AXQjVmY8GFQTVb34hPYyB+G9 PMQONdAJRa2gg6NyB9fDDOJKCpiJDrWnE8xywfIQcNQc6Dn0SVKRQkdzcKETemgGDczW eeuCkApSS1UgzUmW2+jXQqgLipbOeuNnXRd3rUYcxNa+YqkShlO+8cKQzyoZ6CEfzldI 49RA== X-Received: by 10.14.209.131 with SMTP id s3mr6768750eeo.26.1361976863414; Wed, 27 Feb 2013 06:54:23 -0800 (PST) Received: from [192.168.1.111] (mnch-4d0452bb.pool.mediaWays.net. [77.4.82.187]) by mx.google.com with ESMTPS id l8sm6824559een.10.2013.02.27.06.54.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Feb 2013 06:54:22 -0800 (PST) Message-ID: <512E1E1B.6020007@googlemail.com> Date: Wed, 27 Feb 2013 15:54:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: PHP Developers Mailing List References: <512DB820.6060908@sugarcrm.com> In-Reply-To: <512DB820.6060908@sugarcrm.com> Content-Type: multipart/alternative; boundary="------------070707010703070508080902" Subject: Re: [PHP-DEV] Add get_object_constants and get_class_constants From: cryptocompress@googlemail.com (Crypto Compress) --------------070707010703070508080902 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Mike, thank you! It is a useful feature to me. My usecase are checks on defined constants: e.g. on my Bitmasks i want to check if given position-value is valid for current bitmask: http://3v4l.org/CR2qJ e.g. in my Exception Handler i check Exception-Codes: if not defined in Exception class, the underlying api may have changed ... > array *get_defined_constants* ([ bool |$categorize|= false ] ) As there is no equivalent function for classes, i like it simply for the sake of completeness too :) To get rid of performance penalty, i mostly hardcode static arrays with all the constants (high maintenance costs!). cryptocompress --------------070707010703070508080902--