note 100962 deleted from function.halt-compiler by googleguy

From: Date: Tue, 22 Oct 2013 12:17:21 +0000
Subject: note 100962 deleted from function.halt-compiler by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197144@lists.php.net to get a copy of this message
Note Submitter: mael d0t nison 47 epitech d0t net ---- It's possible to use __halt_compiler() with included files. Only the current file will be affected, so it could be a good way to make plugins which embed a controller and its view in the same file (like Ultimater at gmail dot com did). Base.php <?php echo "Base 1\n"; require 'Included.php'; echo "Base2 \n"; ?> Included.php <?php echo "Included 1\n"; __halt_compiler(); echo "Included 2\n"; ?> Calling Base.php will display: Base 1 Included 1 Base 2

« previous php.notes (#197144) next »