Skip to content

v11.39.1

@browner12 browner12 tagged this 10 Dec 14:54
according to the PHP docs, it is better to use assignment over `array_push` for 1 element because then you avoid the overhead of the function call.

https://www.php.net/manual/en/function.array-push.php#:~:text=Note%3A%20If%20you%20use%20array_push()%20to%20add%20one%20element%20to%20the%20array%2C%20it%27s%20better%20to%20use%20%24array%5B%5D%20%3D%20because%20in%20that%20way%20there%20is%20no%20overhead%20of%20calling%20a%20function.
Assets 2
Loading