Re: [PHP-DEV] PHP 4.0 Bug #9884 Updated: Using a return in an included file causes a major abnormality.

2001-03-29 Thread Stanislav Malyshev

HH>> this does not explain why it is possible to declare two functions
HH>> by the same name without getting an error
HH>>
HH>> which of the two hello()'s is going to be called by the main script?

Sorry, missed that one. Weird indeed.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9884 Updated: Using a return in an included file causes a major abnormality.

2001-03-29 Thread stas

ID: 9884
Updated by: stas
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Open
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

reopened - double function definition still there.

Previous Comments:
---

[2001-03-29 06:26:35] [EMAIL PROTECTED]
Using return stops _running_ the script. However, in PHP 4,
scrips are _compiled_ in full before running. That means,
all functions, which are defined on the compile stage, will
be defined no matter what happened when the script was run.

---

[2001-03-20 20:03:16] [EMAIL PROTECTED]
in my stupidity, i spelt weird.inc wrong... but you guys are smart, so i'll assume you 
can correct it.. =) (sorry)

---

[2001-03-20 20:00:01] [EMAIL PROTECTED]
Sorry, i forgot to include the output of test.php, here' you go:

output
Hi From weird.inc... 1

---

[2001-03-20 19:45:13] [EMAIL PROTECTED]
According to documentation and common sense, using a return inside an include, should 
end processing on the include and return to processing the script that called it. This 
is NOT so when functions or classes are declared AFTER the return line. The Following 
example shows 2 very stange abnormalities and it applies to functions aswell as 
classes...

1. functions/classes can still be declared AFTER the return line. The Declared 
function can be executed.

2. If The funtion/class is declared TWICE, it does not print an error. (this hold true 
to any sort of parse error, except errors withing the classes or functions =)

Here's the sample files:

---wierd.inc---


---test.php---


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9884&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] PHP 4.0 Bug #9884 Updated: Using a return in an included file causes a major abnormality.

2001-03-29 Thread Hartmut Holzgraefe

[EMAIL PROTECTED] wrote:
> 
> ID: 9884
> Updated by: stas
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Closed
> Bug Type: Scripting Engine problem
> Assigned To:
> Comments:
> 
> Using return stops _running_ the script. However, in PHP 4,
> scrips are _compiled_ in full before running. That means,
> all functions, which are defined on the compile stage, will
> be defined no matter what happened when the script was run.
[...]

this does not explain why it is possible to declare two functions
by the same name without getting an error

which of the two hello()'s is going to be called by the main script?

-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77 

Besuchen Sie uns auf der CeBIT 2001 - in Halle 6 Stand F62/4

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9884 Updated: Using a return in an included file causes a major abnormality.

2001-03-29 Thread stas

ID: 9884
Updated by: stas
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Assigned To: 
Comments:

Using return stops _running_ the script. However, in PHP 4,
scrips are _compiled_ in full before running. That means,
all functions, which are defined on the compile stage, will
be defined no matter what happened when the script was run.

Previous Comments:
---

[2001-03-20 20:03:16] [EMAIL PROTECTED]
in my stupidity, i spelt weird.inc wrong... but you guys are smart, so i'll assume you 
can correct it.. =) (sorry)

---

[2001-03-20 20:00:01] [EMAIL PROTECTED]
Sorry, i forgot to include the output of test.php, here' you go:

output
Hi From weird.inc... 1

---

[2001-03-20 19:45:13] [EMAIL PROTECTED]
According to documentation and common sense, using a return inside an include, should 
end processing on the include and return to processing the script that called it. This 
is NOT so when functions or classes are declared AFTER the return line. The Following 
example shows 2 very stange abnormalities and it applies to functions aswell as 
classes...

1. functions/classes can still be declared AFTER the return line. The Declared 
function can be executed.

2. If The funtion/class is declared TWICE, it does not print an error. (this hold true 
to any sort of parse error, except errors withing the classes or functions =)

Here's the sample files:

---wierd.inc---


---test.php---


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9884&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9884 Updated: Using a return in an included file causes a major abnormality.

2001-03-20 Thread ceo

ID: 9884
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Scripting Engine problem
Description: Using a return in an included file causes a major abnormality.

in my stupidity, i spelt weird.inc wrong... but you guys are smart, so i'll assume you 
can correct it.. =) (sorry)

Previous Comments:
---

[2001-03-20 20:00:01] [EMAIL PROTECTED]
Sorry, i forgot to include the output of test.php, here' you go:

output
Hi From weird.inc... 1

---

[2001-03-20 19:45:13] [EMAIL PROTECTED]
According to documentation and common sense, using a return inside an include, should 
end processing on the include and return to processing the script that called it. This 
is NOT so when functions or classes are declared AFTER the return line. The Following 
example shows 2 very stange abnormalities and it applies to functions aswell as 
classes...

1. functions/classes can still be declared AFTER the return line. The Declared 
function can be executed.

2. If The funtion/class is declared TWICE, it does not print an error. (this hold true 
to any sort of parse error, except errors withing the classes or functions =)

Here's the sample files:

---wierd.inc---


---test.php---


---


Full Bug description available at: http://bugs.php.net/?id=9884


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9884 Updated: Using a return in an included file causes a major abnormality.

2001-03-20 Thread ceo

ID: 9884
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Scripting Engine problem
Description: Using a return in an included file causes a major abnormality.

Sorry, i forgot to include the output of test.php, here' you go:

output
Hi From weird.inc... 1

Previous Comments:
---

[2001-03-20 19:45:13] [EMAIL PROTECTED]
According to documentation and common sense, using a return inside an include, should 
end processing on the include and return to processing the script that called it. This 
is NOT so when functions or classes are declared AFTER the return line. The Following 
example shows 2 very stange abnormalities and it applies to functions aswell as 
classes...

1. functions/classes can still be declared AFTER the return line. The Declared 
function can be executed.

2. If The funtion/class is declared TWICE, it does not print an error. (this hold true 
to any sort of parse error, except errors withing the classes or functions =)

Here's the sample files:

---wierd.inc---


---test.php---


---


Full Bug description available at: http://bugs.php.net/?id=9884


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]