WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Memory Growth, Memory Leaks, Garbage Collection.
Categories : Debugging, PHP Update Picture
Zeev Suraski
Date : Apr 26th 1998
Grade : 2 of 5 (graded 3 times)
Viewed : 4975
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Zeev Suraski
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

There's no garbage collection in PHP3 within the execution of one script
(memory cannot leak in between script executions, though).
Whether or not PHP grows to take huge amount of memory greatly depends on
your script. A common problem in PHP 3.0 is that resources don't have a
reference count, which means they cannot be automatically deallocated once
they're not used anymore (I hope we'll address this in 3.1). In simple
english it means that a script looking like

for (...) {
$result = mysql_query(...);
...
}

'leaks' memory. Changing it to

for (...) {
$result = mysql_query(...);
...
mysql_free_result($result);
}
will solve that leak (and, in 3.1, due sometime this millenium hopefully,
both would work the same).

So, as you can see, whether or not the memory image grows greatly depends
on what kind of script you have.



Script to check values being submitted by POST or GET method from a form. This script may help diagnose what variables are being supplied by a browser to other php scripts.
Categories : HTML, Variables, Debugging, PHP, HTTP
dump v0.3 - use this to create a HTML table representation of any kind of variable
Categories : Debugging, PHP
The class to check load time of your script VERY usefull for relatively slow applications, but not only..
Categories : PHP, PHP Classes, Debugging
PhpView 0.1 - simple php viewer, using temporary files and frames.
Categories : PHP, PHP Options and Info, Debugging, HTML and PHP
Display variables when a form is submitted using POST/GET
Categories : PHP, Functions, Variables, Debugging
A time measuring and performance benchmarking class
Categories : PHP, PHP Classes, Testing, Debugging, Date Time
phpDocumentor 1.1.0 - automatic documentation tool for PHP. Generates API documentation in HTML, PDF, and CHM formats with automatic linking, smart inheritance and packaging, very fast and stable. Official website http://www.phpdoc.org
Categories : Complete Programs, Debugging, PHP, Documentation
Function to check connection to MySQL and redirect to an error page if an error occurs
Categories : MySQL, PHP, Debugging, Databases
Newbie Notes #4 - Trapping dumb MySQL query errors
Categories : PHP, Databases, MySQL, Debugging, Beginner Guides
PHPLinkRot v1.0 - program which allows users to report broken links on your website just by clicking a button. Works well on custom 404 pages
Categories : PHP, Complete Programs, Debugging, URLs, Site Planning
Newbie Notes #3 - What went wrong? A useful little debugging aid
Categories : PHP, Beginner Guides, Debugging
A Custom Error Handling And Debugging Class
Categories : PHP, PHP Classes, Debugging, Errors and Logging
An email validation script that actually checks against the recipient's mail server.
Categories : Email, Complete Programs, PHP, Network, Debugging
Custom error messages.
Categories : PHP, Debugging
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel