Since PHP 4.1.0, there is a way to do just that by using the new parameter parsing API.
New parameter parsing API: This chapter documents the new Zend parameter parsing API introduced by Andrei Zmievski. It was introduced in the development stage between PHP 4.0.6 and 4.1.0.