php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #4294 return in script called from php.ini stops engine
Submitted: 2000-05-02 10:43 UTC Modified: 2002-01-13 19:06 UTC
From: frip at bigfoot dot com Assigned: torben (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.0 Release Candidate 1 OS: AIX 4.3 / Solaris 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: frip at bigfoot dot com
New email:
PHP Version: OS:

 

 [2000-05-02 10:43 UTC] frip at bigfoot dot com
I don't know if this is a bug but I use the excellent php.prepend.append scripts by Drago which allow files named prepend.inc or append.inc to be parsed before any other one.
This package uses auto_prepend/auto_append directives in the php.ini. When the engine meets a return, it stops.

Here are my compilation options:

Configure command: './configure' '--with-apache=../apache_1.3.12' '--enable-track-vars'
'--prefix=/soft/php-4.0RC1' '--with-yp' '--with-sybase-ct=/soft/sybase'
'--with-ldap=/soft/openldap-1.2.1' '--with-gdbm=/soft/gdbm-1.7.3' '--with-gd=/soft/gd-1.7.3'
'--with-zlib=/soft/zlib-1.1.3' '--enable-sysvshm' '--enable-sysvsem' '--enable-xml'
'--with-mysql=/soft/mysql-3.22.27' '--enable-trans-sid' '--disable-debug'

Greetings

Frip'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 14:20 UTC] stas at cvs dot php dot net
Please provide short reproducing script.
 [2000-08-18 13:06 UTC] waldschrott@php.net
Closed due to missing user feedback.
 [2000-08-19 10:29 UTC] waldschrott@php.net
-- main script --
<?php
  echo "This is the end of the script";
?>
-- prepend --
<?php
  return;
?>

  
 [2000-08-19 10:36 UTC] waldschrott@php.net
well in fact it?s nowhere document what return() exactly
does, it seems to be possible to halt the whole script from
the gloabal scope be putting return() in it,
I don?t know whether this is intended (I think it shouldn?t
be possible to leave the global scope with it, perhaps a
e_notice or warning)
 [2000-08-19 10:39 UTC] waldschrott@php.net
return() is defined now in prepend/append files, but isn?t
documented too...
 [2001-07-10 17:32 UTC] jeroen@php.net
This is a side-effect of the way zend handles things: almost everything is treated as a kind of function. include()ed files, eval()ed code, and also auto_prepended files.

This is sometimes useful, (return from an included library file for example when something is detected).

Anyway, this should be documented. Adding to the phpdoc/TODO
 [2002-01-13 19:06 UTC] torben@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 21:01:31 2025 UTC