Doc #51923 [NEW]: Documentation does not mention changes to return type of shm_attach
| From: | maciej at wiercinski dot net | Date: | Wed, 26 May 2010 14:47:51 +0000 |
| Subject: | Doc #51923 [NEW]: Documentation does not mention changes to return type of shm_attach | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-4446@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: Irrelevant
Package: Semaphore related
Bug Type: Documentation Problem
Bug description:Documentation does not mention changes to return type of shm_attach
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);
--
Edit bug report at http://bugs.php.net/bug.php?id=51923&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51923&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51923&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=51923&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=51923&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51923&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51923&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51923&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51923&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51923&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51923&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51923&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51923&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51923&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51923&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51923&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51923&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51923&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51923&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51923&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51923&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51923&r=mysqlcfg