SyntaxFix
Write A Post
Hire A Developer
Questions
The difference is in the line below to "because in that way there is no overhead of calling a function."
array_push() will raise a warning if the first argument is not an array. This differs from the $var[] behaviour where a new array is created.
array_push()
$var[]