> -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,
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
OK, here's how it goes:
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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) ==
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
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
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
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
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
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
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
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
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
13 matches
Mail list logo