php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51923 Documentation does not mention changes to return type of shm_attach
Submitted: 2010-05-26 16:47 UTC Modified: 2010-10-23 08:30 UTC
From: maciej at wiercinski dot net Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: maciej at wiercinski dot net
New email:
PHP Version: OS:

 

 [2010-05-26 16:47 UTC] maciej at wiercinski dot net
Description:
------------
The documentation says:

resource shm_attach ( int $key [, int $memsize [, int $perm ]] )

,  what's valid on 5.3, however versions prior to it used to return integer. 

-------
$f=trim(`mktemp`); 
$key=ftok($f,'a'); 
$shm = shm_attach($key, 100000);
var_dump($shm);
unlink($f);
-----------
PHP 5.3.1-5 with Suhosin-Patch (cli) (built: Feb 22 2010 17:37:40) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
    with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH


returns: resource(5) of type (sysvshm)


------------
PHP 5.2.6-1+lenny8 with Suhosin-Patch 0.9.6.2 (cli) (built: Mar 14 2010 08:14:04) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Xdebug v2.0.4, Copyright (c) 2002-2008, by Derick Rethans


returns: int(5)


Test script:
---------------
$f=trim(`mktemp`); 
$key=ftok($f,'a'); 
$shm = shm_attach($key, 100000);
var_dump($shm);
unlink($f);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-22 15:45 UTC] kalle@php.net
-Package: Semaphore related +Package: Documentation problem
 [2010-10-23 08:30 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=304639
Log: Fixed bug #51923 (Documentation does not mention changes to return type of shm_attach)
 [2010-10-23 08:30 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-10-23 08:30 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:08 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=9a06fcaef71d8b777e1ff9a43ce3f54256fd4e76
Log: Fixed bug #51923 (Documentation does not mention changes to return type of shm_attach)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 20:00:02 2026 UTC