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


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]