Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66272 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92005 invoked from network); 27 Feb 2013 15:13:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2013 15:13:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=frank.schenk@2e-systems.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=frank.schenk@2e-systems.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain 2e-systems.com designates 213.198.74.81 as permitted sender) X-PHP-List-Original-Sender: frank.schenk@2e-systems.com X-Host-Fingerprint: 213.198.74.81 stats1.2e-systems.com Received: from [213.198.74.81] ([213.198.74.81:57487] helo=STATS1.2e-systems.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/D0-20700-D722E215 for ; Wed, 27 Feb 2013 10:13:02 -0500 Received: from mail.2e-systems.com (unknown [192.168.222.111]) by STATS1.2e-systems.com (Postfix) with ESMTP id 8179E6CC1EB for ; Wed, 27 Feb 2013 16:12:57 +0100 (CET) Received: from schenk.2e-systems.com (schenk.2e-systems.com [192.168.222.155]) by mail.2e-systems.com (Postfix) with ESMTP id 5AADB1803A for ; Wed, 27 Feb 2013 16:12:57 +0100 (CET) Message-ID: <512E2278.3070406@2e-systems.com> Date: Wed, 27 Feb 2013 16:12:56 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.22) Gecko/20110902 Lightning/1.0b2 Thunderbird/3.1.14 ThunderBrowse/3.82 MIME-Version: 1.0 To: internals@lists.php.net References: <512DB820.6060908@sugarcrm.com> <512E1E1B.6020007@googlemail.com> In-Reply-To: <512E1E1B.6020007@googlemail.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Add get_object_constants and get_class_constants From: frank.schenk@2e-systems.com (Frank Schenk) Hi Crypto Compress, big congratz to that name, your mummy Hash Compress and your daddy Image Compress must be very proud! SCNR Am 02/27/2013 03:54 PM, schrieb Crypto Compress: > Hello Mike, > > thank you! It is a useful feature to me. > > class MyBitmask { > const POS_1 = 1; > // const POS_2 = 2; // reserved/undefined > // const POS_3 = 3; // reserved/undefined > const POS_4 = 4; I'm developing software with PHP since version 2 and i'm still easily impressed by such code. So we need get_object_constants and get_class_constants for such fancy stuff? Where's the good old $flag == true; or FLAG == true;? A bitmask class to shuffle around with class constants using reflection of itself and a magic method get_class_constants to check a boolean flag? I just don't get it but maybe i'm to focused to doing things the most simple and readable/maintainable way. Maybe, in a few years, c++ will be a beginners language compared to PHP which gets added new shiny features every day which will only be used by even more shiny frameworks and the most shiniest, bloated objects one can imagine. With every fancy feature added to PHP you kill a kitten! I'm more with this "Give PHP and it's core developers a rest" so that the core can be improved/cleaned up instead of adding Java features people have seen on the university and like them but now they're forced to use PHP which is like the opposite of Java. Java has it's good reasons too. Just a tool. Use the tool that fits best, don't use the hammer as a saw by adding teeth to it. Cheers, Frank -- Frank Schenk Software Analyst 2e Systems Tel: +49 - 6196 - 95058 - 30 Fax: +49 - 6196 - 95058 - 94 E-mail: frank.schenk@2e-systems.com Address: 2e Systems GmbH, Königsteiner Str. 87, D-65812 Bad Soden am Taunus Company registration: Amtsgericht Königstein (Germany), HRB 7303 Director: Philip Douglas http://www.2e-systems.com/ - making your business fly!