I'm looking for a regular expression that will accurately identify any PHP call time pass by references in source code in order to aid migration to PHP 5.3.
Currently, I have [^=&]\s*&\s*\$
, but this doesn't filter out assignment cases ($var = &$othervar;
).
This regexp should be compatible with eclipse (sorry, not sure what flavor of regexp eclipse parses).
Edit: This one is a little bit closer (although a bit of a hack): (?<!([&=]\s{0,15}))&\s*\$