News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Understanding Recursion
June 06, 2013 @ 09:32:41

On PHPMaster.com today there's a new tutorial posted that talks about something that can be a more difficult concept for budding developers to grasp - recursion.

In one of my previous articles I wrote about iterators and how you can use them. Today I'd like to look at the fraternal twin of iteration: recursion. A recursive function is one that calls itself, either directly or in a cycle of function calls. Recursion can also refer to a method of problem solving that first solves a smaller version of the problem and then uses that result plus some other computation to formulate an answer to the original problem.

He starts with an example - one function showing how to calculate a factorial using just looping and the other by having the function call itself. He talks some about the different types of recursion (direct/indirect) and gives a more practical example, a "find in array" function for one with nested subarrays. He also briefly mentions "head" and "tail" recursion, the difference being if it waits for a return value or not. He also offers some general advice when it comes to using recursion and how you have to watch for optimization issues.

0 comments voice your opinion now!
recursion tutorial introduction head tail direct indirect

Link: http://phpmaster.com/understanding-recursion

Michael Caplan's Blog:
Don't Forget to Flush
January 08, 2009 @ 12:09:15

In this recent post to his blog Michael Caplan looks at a feature of PHP that's sometimes forgotten when pushing out larger chunks of data - flushing.

As a recluse who prefers hiding behind servers rather than dancing around your web browser's canvas, I was intrigued with their server side recommendations - however sparse they may be. In particular, flushing generated head content early to speed up overall page delivery and rending time was a technique new to me.

Michael looks at what "flushing generated head content" means and includes a scenario - pulling the top palettes from the COLOURlovers site - and some performance stats on page load time and response time directly from the server (complete with graphs).

0 comments voice your opinion now!
flush chunk compress head content load time statistics response


Tobias Schlitt's Blog:
Sending HEAD requests with ext/curl
June 27, 2008 @ 08:48:02

In a new post, Tobias Schlitt looks at how to send HEAD requests right along with the rest of your payload with the ext/curl extension for PHP.

I recently wanted to perform a HEAD request to a file, after which I wanted to perform some more advanced HTTP interaction, so CURL was also the tool of choice here.

He started with the (slow?) command line to get the parameters right before moving into PHP. After picking out the right ones ("curl -I -X HEAD http://localhost/admin/") he transfers them into a series of curl_setopt calls that specifies a HEAD request type and no content to send (with CURLOPT_NOBODY).

0 comments voice your opinion now!
head request curl extension tutorial curlsetopt curlopt


David Coallier's Blog:
Namespaces has PHP 5.3 (Or the other way around)
October 01, 2007 @ 10:21:00

David Coallier has some happy news for PHP developers all over - namespaces have officially been committed to to HEAD branch:

This means that the next PHP version (5.3) will have namespaces. The patch by Greg Beaver to allow multiple namespaces has not been applied yet but I sure do expect it to be applied to 5_3 and HEAD soon.

More technical details can be found via the patch details and some basic articles on how to use them in your code.

0 comments voice your opinion now!
namespace php5 head branch patch commit tutorial namespace php5 head branch patch commit tutorial


Zend Developer Zone:
Zend Weekly Summaries Issue #322
January 29, 2007 @ 12:27:00

The latest weekly summary for the PHP mailing lists has been posted over on the Zend Developer Zone. This week, discussions included:

  • Sandboxed semaphores
  • Focus on *printf [continued]
  • PHP 5.2.1 RC2 and PHP 4.4.5 RC1
  • It's all in the HEAD
Descriptions of each of the headings are provided, including code and a "short version" for those on the run.

Be sure to check back each week for a new summary.

0 comments voice your opinion now!
zend weekly summary semaphore fileinfo relrease fastcgi head openssl zend weekly summary semaphore fileinfo relrease fastcgi head openssl



Community Events





Don't see your event here?
Let us know!


api introduction wordpress podcast code release developer unittest threedevsandamaybe laravel series install language refactor list framework testing community opinion interview

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