|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43673 Wrong parameter usage in array_unshift manual
Submitted: 2007-12-25 15:46 UTC Modified: 2007-12-28 15:06 UTC
From: php at typefreak dot nl Assigned:
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
6 - 5 = ?
Subscribe to this entry?

 [2007-12-25 15:46 UTC] php at typefreak dot nl

The page gives the following syntax for this function:

int array_unshift  ( array $array  , mixed $var  [, mixed $ ...  ] )

However, the first parameter should be given 'by reference', according to the english manual.

Correct syntax (added &):

int array_unshift  ( array &$array  , mixed $var  [, mixed $ ...  ] )

Reproduce code:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-28 15:06 UTC]
It is outdated, when updated it will be fixed.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 13:03:49 2021 UTC