RE: [PHP] PHP and #if

2008-03-14 Thread Andrés Robinet
> -Original Message- > From: Eric Gorr [mailto:[EMAIL PROTECTED] > Sent: Friday, March 14, 2008 3:22 PM > To: PHP General > Subject: Re: [PHP] PHP and #if > > > On Mar 14, 2008, at 3:15 PM, Eric Gorr wrote: > > > > > On Mar 14, 2008, at 3:10 PM,

Re: [PHP] PHP and #if

2008-03-14 Thread Stut
On 14 Mar 2008, at 19:21, Eric Gorr wrote: On Mar 14, 2008, at 3:15 PM, Eric Gorr wrote: On Mar 14, 2008, at 3:10 PM, Stut wrote: On 14 Mar 2008, at 19:03, Eric Gorr wrote: Unfortunately, such things cannot be used to wrap functions. Erm, yes they can. Try it. Gives: Parse error: synta

Re: [PHP] PHP and #if

2008-03-14 Thread André Medeiros
OK, here's how it goes: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP and #if

2008-03-14 Thread Shawn McKenzie
Eric Gorr wrote: > > On Mar 14, 2008, at 3:15 PM, Eric Gorr wrote: > >> >> On Mar 14, 2008, at 3:10 PM, Stut wrote: >> >>> On 14 Mar 2008, at 19:03, Eric Gorr wrote: Unfortunately, such things cannot be used to wrap functions. >>> >>> Erm, yes they can. Try it. >>> >>> >> if (rand(0,1) ==

Re: [PHP] PHP and #if

2008-03-14 Thread Eric Gorr
On Mar 14, 2008, at 3:15 PM, Eric Gorr wrote: On Mar 14, 2008, at 3:10 PM, Stut wrote: On 14 Mar 2008, at 19:03, Eric Gorr wrote: Unfortunately, such things cannot be used to wrap functions. Erm, yes they can. Try it. Gives: Parse error: syntax error, unexpected T_STRING in /Users/E

Re: [PHP] PHP and #if

2008-03-14 Thread Eric Gorr
On Mar 14, 2008, at 3:10 PM, Stut wrote: On 14 Mar 2008, at 19:03, Eric Gorr wrote: Unfortunately, such things cannot be used to wrap functions. Erm, yes they can. Try it. Gives: Parse error: syntax error, unexpected T_STRING in /Users/Eric/Sites/ ifWrapping.php on line 3 -- PHP G

Re: [PHP] PHP and #if

2008-03-14 Thread Stut
On 14 Mar 2008, at 19:03, Eric Gorr wrote: Unfortunately, such things cannot be used to wrap functions. Erm, yes they can. Try it. Oh, and top-posting is evil, please don't do it. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

Re: [PHP] PHP and #if

2008-03-14 Thread Shawn McKenzie
Eric Gorr wrote: > Unfortunately, such things cannot be used to wrap functions. > > > > On Mar 14, 2008, at 2:38 PM, Dave Goodchild wrote: > >> in php you have a number of constructs that can be used to execute >> code (or not) based on certain conditions ie is_defined(). Not sure if >> the com

Re: [PHP] PHP and #if

2008-03-14 Thread Eric Gorr
Unfortunately, such things cannot be used to wrap functions. On Mar 14, 2008, at 2:38 PM, Dave Goodchild wrote: in php you have a number of constructs that can be used to execute code (or not) based on certain conditions ie is_defined(). Not sure if the comparison with C holds true as C is c

Re: [PHP] PHP and #if

2008-03-14 Thread Stut
On 14 Mar 2008, at 18:34, Eric Gorr wrote: If you are talking about simply commenting code out, yes, I am aware of this...however, the #if technique is far more capable in certain situations. There are reasons why C, etc. has included the ability to comment out lines of code and also provi

Re: [PHP] PHP and #if

2008-03-14 Thread Dave Goodchild
in php you have a number of constructs that can be used to execute code (or not) based on certain conditions ie is_defined(). Not sure if the comparison with C holds true as C is compiled and PHP is interpreted. On Fri, Mar 14, 2008 at 6:34 PM, Eric Gorr <[EMAIL PROTECTED]> wrote: > If you are ta

Re: [PHP] PHP and #if

2008-03-14 Thread Eric Gorr
If you are talking about simply commenting code out, yes, I am aware of this...however, the #if technique is far more capable in certain situations. There are reasons why C, etc. has included the ability to comment out lines of code and also provide #if's. But based on your reply, I have

Re: [PHP] PHP and #if

2008-03-14 Thread Børge Holen
On Friday 14 March 2008 19:19:30 Eric Gorr wrote: > In C, etc. one can place #if's around code to determine whether or not > the compiler should pay any attention to the code. > > Is there a similar technique for PHP? > > I've not seen anything like this before and a brief search hasn't > turned up