From 3f7ccc902a91aac2ff6ac2fe8947f07f989fbf03 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 23 Oct 2007 14:16:59 +0000 Subject: Properly parse ED parameters using the PHP tokenizer to handle function calls --- it_debug.class | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'it_debug.class') diff --git a/it_debug.class b/it_debug.class index 92753b2..bd81720 100644 --- a/it_debug.class +++ b/it_debug.class @@ -87,10 +87,33 @@ function dump($args) $src = $GLOBALS['it_debug::dump source'][$file][$line-1]; - $paramlist = preg_match('/(D|ED|EDC|EDX)\s*\(\s*([^)]+)/i', $src, $parts) ? $parts[2] : ""; - $argnames = preg_split('/\s*,\s*/', $paramlist); + list($function, $paramlist) = it::match('\b(D|ED|EDC|EDX)\s*\((.*)', $src); + $paramtokens = token_get_all("