| Title |
Test
Find
PHP Function Regex
|
| Expression |
^\s*\w+\s*\((\s*(("|')([^\3]+|\\\3)\3|\$?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]|[0-9]*)\s*,?)*\s*\) |
| Description |
I needed a regex to parse PHP functions, so I made it and here it is. It will not validate with array variables as the function arguments. |
| Matches |
myfunction('string', "another", 123 ,$var2, CONSTANT ) |
| Non-Matches |
my=function('str'ing', $1var, 133t,$array[2] ) |
| Author |
Rating:
Ivik Injerd
|
| Source |
|
| Your Rating |
|