Difference between array_push() and $array[] =

When you call a function in PHP (such as array_push()), there are overheads to the call, as PHP has to look up the function reference, find its position in memory and execute whatever code it defines. Using $arr[] = ‘some value’; does not require a function call, and implements the addition straight into the data … Read more

What does ‘–set-upstream’ do?

To avoid confusion, recent versions of git deprecate this somewhat ambiguous –set-upstream option in favor of a more verbose –set-upstream-to option with identical syntax and behavior. [ Reference ] git branch –set-upstream-to <remote-branch> sets the default remote branch for the current local branch. Any future git pull command (with the current local branch checked-out), will … Read more