What happens faster when adding variables to an array?
and please indicate the difference between them, if any.
http://www.php.net/manual/en/function.array-push.php#53289
The holder of Empy does not check, the variable is an array at first as array_push does. If array_push finds that the variable is not an array, it displays a warning message if E_ALL error reporting is enabled.So, array_push is safer than [], while this is further modified by PHP developers.
The holder of Empy does not check, the variable is an array at first as array_push does. If array_push finds that the variable is not an array, it displays a warning message if E_ALL error reporting is enabled.
So, array_push is safer than [], while this is further modified by PHP developers.
$variable[] seems a lot faster:
$variable[]
http://www.php.net/manual/en/function.array-push.php#83388
, array_push() :
array_push()
http://www.php.net/manual/en/function.array-push.php#84959
, . , , , .
, .
ps: .
pps: :