#48311 [NEW]: Controlable object diposing
From: av3ng3r at gmail dot com
Operating system: -
PHP version: 6CVS-2009-05-17 (CVS)
PHP Bug Type: Feature/Change Request
Bug description: Controlable object diposing
Description:
------------
An implementation like C# (
http://www.coderjournal.com/2007/02/proper-use-idisposable/
) would be
appreciated:
using(StreamReader reader = new StreamReader(stream))
{
reader.write('blalblabab');
}
The class StreamReader implements an interface IDisposable, by
implementing this interface (creating a function in the class called;
Dispose) the user can use the statement using to control the disposal of
the object manually instead of waiting of the garbage collection of PHP.
This would be usefull for controling database connections, socket
connections, simplexml?, etc.
--
Edit bug report at http://bugs.php.net/?id=48311&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48311&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48311&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48311&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48311&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48311&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48311&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48311&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48311&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48311&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48311&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48311&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48311&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48311&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48311&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48311&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48311&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48311&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48311&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48311&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48311&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48311&r=mysqlcfg
Thread (6 messages)
- av3ng3r at gmail dot com