-
- private static function export($value)
- {
- if (!is_array($value)) {
- return var_export($value, true);
- }
- $code = array();
- foreach ($value as $k => $v) {
- $code[] = sprintf('%s => %s', var_export($k, true), self::export($v));
- }
-
- return sprintf('array(%s)', implode(', ', $code));
- }