We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
This page will keep track of all Regex improvements. Once the code improvement has been added, just mark it as Added.
[b]system/helpers/string_helper.php - line 70[/b] [b][color=red]NOT ADDED[/color][/b]
[b][color=red]BEFORE:[/color][/b] 10000 iterations take about [b]0.0873 seconds[/b] [code] function reduce_double_slashes($str) { return preg_replace("#([^:])//+#", "\1/", $str); } [/code]
[b][color=green]AFTER:[/color][/b] 10000 iterations take about [b]0.0429 seconds[/b] [code] function reduce_double_slashes($str) { return preg_replace('#(?<!:)//+#', '/', $str); // twice as fast, woot! } [/code]
There was an error while loading. Please reload this page.