[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Help me:Rename DN with childrens in PHP.



tor, 2002-10-17 kl. 21:21 skrev Charles B Cranston:

> (answer: in PHP).  Guess what.  PHP doesn't have any such constants
> as LDAP_COMPARE_TRUE or LDAP_COMPARE_FALSE.  The FPHPM says to just
> compare against TRUE or FALSE.  Because LDAP_COMPARE_TRUE is not
> anything special to PHP, it is a string "LDAP_COMPARE_TRUE" which is
> TRUE (the only thing that is FALSE is 0 or "").  So the above code
> is syntactically equivalent to:

> switch(ldap_compare(stuff)) {
> case true:
>    one thing
> case true:
>    another thing
> default:
>    a third thing
> }

> So when the compare was true everything was just fine, one thing
> got done.  But when the compare was false it did a third thing
> instead of another thing.   Sheesh.   There is too little
> Hamming distance between valid statements in these damn
> interpreter languages like PHP and Perl...

I'm very simple, I don't understand this reasoning:

> case true:
>    one thing
> case true:
>    another thing
> default:
>    a third thing

To me, what is true is true (light is on), and what is false is false
(light is off.) There can only be 2 alternatives, *never* 3.

Best,

Tony

-- 

Tony Earnshaw

"There are many people who can't face the truth ... If you rob a
normal person of life's lies, at the same time you'll be robbing
him of his happiness."

>From Henrik Ibsen's "Vildanden", "The wild Duck."

e-post:		tonni@billy.demon.nl
www:		http://www.billy.demon.nl