Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66245 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4947 invoked from network); 26 Feb 2013 15:19:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2013 15:19:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=pencap@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pencap@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.176 as permitted sender) X-PHP-List-Original-Sender: pencap@gmail.com X-Host-Fingerprint: 209.85.223.176 mail-ie0-f176.google.com Received: from [209.85.223.176] ([209.85.223.176:60468] helo=mail-ie0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/13-16132-F82DC215 for ; Tue, 26 Feb 2013 10:19:44 -0500 Received: by mail-ie0-f176.google.com with SMTP id k13so4527667iea.35 for ; Tue, 26 Feb 2013 07:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=ZivLjQOpVMAXttHY+UCQPKPW+BnkFvYX4VxggzkUxLI=; b=G7TcwUTDeHQFbWjTxiQbNX9U6GlbAHFA7HP+lMP2Nv/NDYjHFfi6hpNTxd7pKTF0HV 8AKJOT0OlNVRYnGBP3TnBVrjDe53Wj3AzZE/gf5kw3tVNE/FIrE9olj6KIHtmDikN4oB m7m6Vapc9sjRwiMNd5Ws6VZK3eibQ1OpM89zeaW5EvdI3gYsmt0GgHPG5Deqj+NAmqJF pB+pNeweFlGJ6h/bh5HXfy94X07Kx245QurVlvrp0e4tSt/bkh1Q5VMnM+GxX68Zvgg1 xJLiafKIvZUm+z4l4z8QM9z5ZzGhGeEyes2w3kTV/96QK4lDvzEbSXzCkqZVBCqVmabQ SDcg== MIME-Version: 1.0 X-Received: by 10.42.204.79 with SMTP id fl15mr6317542icb.57.1361891980842; Tue, 26 Feb 2013 07:19:40 -0800 (PST) Received: by 10.50.85.232 with HTTP; Tue, 26 Feb 2013 07:19:40 -0800 (PST) Date: Tue, 26 Feb 2013 07:19:40 -0800 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=20cf303ddba6bdb13904d6a22fc2 Subject: Add get_object_constants and get_class_constants From: pencap@gmail.com (Mike Willbanks) --20cf303ddba6bdb13904d6a22fc2 Content-Type: text/plain; charset=UTF-8 Hello All, Before drafting an RFC I would like to gauge interest in adding: get_object_constants and get_class_constants Currently this can only be done through ReflectionClass which is far slower than retrieving them directly from the constants table. Some simple timings show that through reflection retrieving these values is 2-3 times slower than providing a quick access function for retrieval. This also fits nicely amongst the current stack of: get_object_vars, get_class_vars and get_class_methods These functions are commonly asked about on areas such as StackOverflow ( http://stackoverflow.com/questions/956401/can-i-get-consts-defined-on-a-php-class) amongst other places on the net. I have already drafted up a PR with the changes and supplemental data: https://github.com/php/php-src/pull/292 Regards, Mike --20cf303ddba6bdb13904d6a22fc2--