Skip to content

Commit

Permalink
added the ability to use dot and single quotes in the keys and values
Browse files Browse the repository at this point in the history
  • Loading branch information
vatson committed Oct 24, 2011
1 parent d4ced22 commit 8607c6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dumper/PhpDumper.php
Expand Up @@ -1022,7 +1022,7 @@ private function dumpValue($value, $interpolate = true)
$code = str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters, var_export($value, true)));

// optimize string
$code = preg_replace(array("/^''\./", "/\.''$/", "/'\.'/", "/\.''\./"), array('', '', '', '.'), $code);
$code = preg_replace(array("/^''\./", "/\.''$/", "/(\w+)(?:'\.')/", "/(.+)(?:\.''\.)/"), array('', '', '$1', '$1.'), $code);

return $code;
}
Expand Down

0 comments on commit 8607c6b

Please sign in to comment.