News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Christopher Jones' Blog:
Temporary LOBS in PHP's OCI8 Extension. Instant Client.
0 comments :: posted Monday January 21, 2008 @ 12:05:00
voice your opinion now!

Christopher Jones talks today on his blog about a bug he's just corrected and integrated into the release of the Oracle Instant Client that lets PHP correctly take advantage of the temporary LOBS functionality.

When PHP is done with the temporary LOB, it needs to tell Oracle to destroy it. If this isn't done, then the temporary LOB will hang around using DB space until the connection is closed. I just merged a fix worked on by Krishna Mohan and myself for bug 43497.

Example code is included showing two instances of its use - a normal use that frees the memory correctly and the other showing how to create the temporary lob to hold the data as needed.

tagged with: temporary lob patch oci8 extension instant client memory leak


Tim Koschuetzki's Blog:
Composing Methods Remove Assignments to Parameters
0 comments :: posted Friday July 06, 2007 @ 10:21:00
voice your opinion now!

In another part of his "Composing Methods" series, Tim Koschuetzki posts about removing assignments to parameters today - working with a temporary variable inside a method rather than the actual passed in value.

When your code assigns to a parameter in a function/method, use a temporary variable instead. [...] It will make your code much more readable and prevents by-reference confusion and therefore big problems in the future.

His example code uses the illustration of calling a price() method in a class to modify the inputVal value based on other inputted information. His suggestion is to not work with the actual inputVal value passed in (so as to avoid issues if it happens to be passed my reference later), but to work with a temporary variable - $result - inside the method.

tagged with: method compose remove assignment parameter temporary variable method compose remove assignment parameter temporary variable


zend releases developer PHP5 ajax release conference zendframework pecl application PEAR mysql job database code package book security framework cakephp

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework