News Feed
Sections




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

Knut Urdalen's Blog:
The return value of include
November 28, 2008 @ 10:33:57

In a new entry Knut Urdalen looks at something that some PHP developers might have forgotten about - the return value of the include statement.

PHP never stops surprising me. I just found out that you're able to return values from the inclusion statements (require, require_once, include and include_once) through an example of Zend_Config.

His example puts an array of values inside the include file with a return statement. This script is included from another and, because of the return, the array data is passed back out into a waiting variable set equal to the include statement.

0 comments voice your opinion now!
include return value array zendconfig example


blog comments powered by Disqus

Similar Posts

DevShed: Fundamentals of Recursion in PHP (Part 1)

Zend Developer Zone: Refactoring PHP Code

Cocoliso's Blog: Adding A Syntax Highlighter To Your Site: The Power Of Geshi

Brandon Savage's Blog: Five Cool PHP Array Functions

Padraic Brady's Blog: Example Zend Framework Blog Application Tutorial: Parts 1-8 Revisited


Community Events





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


threedevsandamaybe project series podcast introduction interview configure code wordpress list application language bugfix community laravel release api framework library developer

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