userland macros

From: Date: Mon, 18 Aug 2003 18:56:56 +0000
Subject: userland macros
Groups: php.internals 
Request: Send a blank email to internals+get-4068@lists.php.net to get a copy of this message
Is possible to implement userland macros in a PHP extension or it can only be implemented in the core? I know that macros is a preprocessor task and I think PHP has no preprocessor (does it?). So it's possible to implement a preprocessor ? An example (or something like that): <? #define DEFAULT_VALUE(check_value, default_value) (isset(check_value) ? check_value : default_value) $a = DEFAULT_VALUE($my_array['some_index'], true); ?> Best regards, Cristiano Duarte

« previous php.internals (#4068) next »