From 3ef0c43348c8f735bab740e4a9b7bf8df26fbb00 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 22 Apr 2009 12:49:48 +0000 Subject: Get rid of ereg/split, replaced by preg equivalents --- it_debug.class | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'it_debug.class') diff --git a/it_debug.class b/it_debug.class index 4b0650a..e1766f3 100644 --- a/it_debug.class +++ b/it_debug.class @@ -80,7 +80,7 @@ function srcline($stackoffs = 0) */ function dump($args) { - if (ereg('(csv|txt|gif|jpg)', $_SERVER['PHP_SELF'])) + if (preg_match('/csv|txt|gif|jpg/', $_SERVER['PHP_SELF'])) $plain = 1; else if ($_SERVER['REMOTE_ADDR']) { @@ -136,7 +136,7 @@ function dump($args) { list (, $head, $classname, $values, $tail) = $regs; $classname = strtolower($classname); - $values = preg_replace("#'(\w+)' =>([^\n]+),#", 'var \$$1 = $2;', $values); + $values = preg_replace("#'(\w+)' =>\s*([^\n]+),#", 'var \$$1 = $2;', $values); $item = $head . "class $classname { $values }$tail"; } @@ -151,7 +151,7 @@ function dump($args) if (isset($_SERVER['REMOTE_ADDR']) && !$plain) $item = htmlspecialchars($item); - if (ereg('^[\'"]', $var)) + if (preg_match('/^[\'"]/', $var)) $r .= "$item "; else { $var = "$blue$var=$noblue"; -- cgit v1.2.3