Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20047 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25033 invoked by uid 1010); 16 Nov 2005 01:51:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25018 invoked from network); 16 Nov 2005 01:51:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2005 01:51:57 -0000 X-Host-Fingerprint: 66.216.66.81 mail.ionzoft.com Linux 2.4/2.6 Received: from ([66.216.66.81:40205] helo=mail.ionzoft.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 59/6B-07637-CB09A734 for ; Tue, 15 Nov 2005 20:51:56 -0500 Received: from JASONGARBER2 (207-255-4-232-static.aoo.pa.atlanticbb.net [207.255.4.232]) by mail.ionzoft.com (Postfix) with ESMTP id AF9CA8A407C; Tue, 15 Nov 2005 20:52:27 -0500 (EST) Date: Tue, 15 Nov 2005 20:51:52 -0500 X-Mailer: The Bat! (v3.5.25) Professional Reply-To: Jason Garber Organization: IonZoft, Inc. X-Priority: 3 (Normal) Message-ID: <05311866.20051115205152@ionzoft.com> To: internals@lists.php.net CC: andrew@ionzoft.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: PHP Macros From: jason@ionzoft.com (Jason Garber) Hello Internals, Remember the ifsetor() discussion? There were many, many people for it, and many people that did not see the point. To this day, it's not been allowed into the source tree, and I don't see any way to change that. So... Please consider (some form of) this if it's possible: define_macro square(x) { ((x) * (x)) } define_macro ifsetor(x, y) { (isset(x) ? x : y) } $n = square($n); If the parser/compiler sees one of these, then it will add it to it's list of "macros", and when it runs into the usage of one, it will do a little token-replacing before compiling it... Is it technically doable? Thanks guys. -- Best regards, Jason Garber mailto:jason@ionzoft.com