Why does the official manual use the slim source code? $ route is an object and $ setOutputBuffering is a method in it. PS: What is the advanced usage?
This usage is found when you look at the slim source code.
Official Manual
Why can this be used? $ route is an object and $ setOutputBuffering is a method in it.
======================
PS: What is this advanced usage?
Reply content:
This usage is found when you look at the slim source code.
Official Manual
Why can this be used? $ route is an object and $ setOutputBuffering is a method in it.
======================
PS: What is this advanced usage?
First,[...]
Square brackets arePhp5.4
An array short write syntax provided after is actuallyArray (...)
The results are the same.
Second,Callable
InPhp
Indicates the executable method,Callable
There are many ways to represent, using arrays to represent is one of them. Here[$ Route, 'setoutputbuffer']
Indicates$ Route
In this objectSetOutputBuffering
This method.
The last syntax isPhp
InHEREDOC
Syntax is actually a multi-line string representation method.
[$ Route, 'setoutputbuffer']
This is commonly used inCall_user_func_array