On May 1, 2006, at 11:42 PM, Rasmus Lerdorf wrote:
I think this looks ok. I have been trying to come up with a shorter
and cleaner syntax to specify these things, but so far I haven't come
up with anything I really like. The closest I have come is something
like this:
$args = array(
'product_id' => 'Enc',
'component' => 'Int:Array:1-10',
'versions' => 'Enc',
'doesnotexist' => 'Int',
'testscalar' => 'Int:Scalar',
'testarray' => 'Int:Array'
);
You should just take Perl approach and use sigils [1]. :)
$args = array(
'product_id' => '%',
'component' => 'i[1-10]',
'versions' => '%',
'doesnotexist' => 'i',
'testscalar' => 'i$',
'testarray' => 'i[]'
);
-Andrei
[1] http://en.wikipedia.org/wiki/Sigil_%28computer_programming%29
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php