Page 1 of 1

creating a new operator

Posted: Sat Aug 28, 2004 6:46 pm
by evilcoder
Hey guys,

Just wanted to know if it were possible to use "define" or something of the like to create a new operator?

I want something like this:

Code: Select all

define ( "not" , ! , true );
So i can construct text based arguments:

Code: Select all

<?php
   if ( not $x )
   &#123;
      return false;
    &#125;
?>
Thanks guys

Posted: Sat Aug 28, 2004 6:57 pm
by feyd
AFAIK, no... you'd need to modify the PHP core to have that.

Posted: Sat Aug 28, 2004 8:47 pm
by m3mn0n
Maybe creating a new function and setting a cookie/session?