[
8
]
• More testable: Many of the original functions can be tricky to use in tests,
due to the exceptions they throw and also because they are more difficult
to mock.
• More feature complete: This is achieved by adding functions that did not
exist before, such as
File::copyDirectory($directory, $destination)
.
There are very rare instances where expressiveness is foregone in the favor of
brevity. This is the case for commonly-used shortcut functions, such as
e()
, that
escape HTML entities, or
dd()
, with which you can halt the execution of the script
and dump the contents of one or more variables.
Do'stlaringiz bilan baham: |