Skip to content

Commit afb82e7

Browse files
committed
Optimize varexport function
1 parent 226cc72 commit afb82e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Support/helpers.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function varexport($expression, bool $return = false)
3838
$export = var_export($expression, true);
3939

4040
$patterns = [
41+
"/array \(\n\)/" => '[]',
4142
"/array \(\n\s+\)/" => '[]',
4243
"/array \(/" => '[',
4344
"/^([ ]*)\)(,?)$/m" => '$1]$2',

0 commit comments

Comments
 (0)