Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45638 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22507 invoked from network); 27 Sep 2009 05:13:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2009 05:13:26 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@warpmail.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cpriest@warpmail.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain warpmail.net does not designate 67.200.52.70 as permitted sender) X-PHP-List-Original-Sender: cpriest@warpmail.net X-Host-Fingerprint: 67.200.52.70 mail.omnisync.net Received: from [67.200.52.70] ([67.200.52.70:52232] helo=mail.omnisync.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/64-20933-574FEBA4 for ; Sun, 27 Sep 2009 01:13:25 -0400 Message-ID: <4ABEF474.3000208@warpmail.net> Date: Sun, 27 Sep 2009 00:13:24 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: PHP Developers Mailing List References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Bitwise Declaration of Flags From: cpriest@warpmail.net (Clint Priest) Are there any plans to allow bitwise declaration of flags? Example: class foo { const FLAG_1 = 1; const FLAG_2 = 2; const FLAG_3 = 4; private $Flags = self::FLAG_1 | self::FLAG_3 } The above doesn't work, gets a syntax error on the | operator. Has anyone thought about a change to allow this type of functionality? I end up doing something like this which is less than optimal private $Flags = 3 /* self::FLAG_1 | self::FLAG_3 */ Thanks, -Clint