News Feed
Jobs Feed
Sections




News Archive
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

Wez Furlong's Blog: PHP Objective-C Bridge

Stuart Herbert's Blog: Quick Tip: Get, Set and Query in One Method

PHPied.com: JSON renderer for Text_Highlight

DevShed: Abstract Classes in PHP - Setting Up a Concrete Example

Kae Verans' Blog: innerHTML in php-dom


Community Events











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


community composer functional development testing opinion introduction language database zendframework2 release interview tool code conference podcast series example framework object

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