diff options
author | Greg Beaver <cellog@php.net> | 2005-10-20 01:49:42 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2005-10-20 01:49:42 +0000 |
commit | 3446a75a36964410413bd57f756120f1868fc463 (patch) | |
tree | 6d2a96700b472f931c29b8dc5075130b1935e669 /pear/tests/php_dump.php.inc | |
parent | 5bb29235dcf14be317f07d389b5be2f2c5318950 (diff) | |
download | php-git-3446a75a36964410413bd57f756120f1868fc463.tar.gz |
remove unused obsolete files from pear CVS
# to run PEAR tests, grab pear-core/tests and use "pear run-tests -rq"
Diffstat (limited to 'pear/tests/php_dump.php.inc')
-rw-r--r-- | pear/tests/php_dump.php.inc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/pear/tests/php_dump.php.inc b/pear/tests/php_dump.php.inc deleted file mode 100644 index 4f7a666295..0000000000 --- a/pear/tests/php_dump.php.inc +++ /dev/null @@ -1,57 +0,0 @@ -<?php -class PHP_Dump { - var $_var; - function PHP_Dump($var) - { - $this->_var = $var; - } - - function toPHP() - { - return $this->_toUnknown($this->_var); - } - - function _toUnknown($var, $indent = ' ') - { - switch (gettype($var)) { - case 'array' : - return $this->_toArray($var, $indent); - case 'boolean' : - return $this->_toBool($var, $indent); - case 'double' : - case 'integer' : - return $this->_toNumber($var, $indent); - case 'NULL' : - return "{$indent}null"; - case 'string' : - return $this->_toString($var, $indent); - } - } - - function _toString($var, $indent) - { - return $indent . '"' . addslashes($var) . '"'; - } - - function _toBool($var, $indent) - { - return $indent . ($var ? 'true' : 'false'); - } - - function _toNumber($var, $indent) - { - return $indent . $var; - } - - function _toArray($var, $indent = ' ') - { - $ret = $indent . "array(\n"; - foreach ($var as $key => $value) { - $ret .= $indent . ((is_int($key) || is_double($key)) ? $key : "'$key'") . " =>\n"; - $ret .= $this->_toUnknown($value, "$indent ") . ",\n"; - } - $ret .= $indent . ')'; - return $ret; - } -} -?>
\ No newline at end of file |