ID:               38185
 User updated by:  martin dot dreier at web dot de
 Reported By:      martin dot dreier at web dot de
-Status:           Feedback
+Status:           Open
 Bug Type:         Output Control
 Operating System: Mac OS X 10.4.7
 PHP Version:      5.1.4
 New Comment:

With error_reporting(E_ALL), output is now:

localhostx/
Notice: Undefined variable: abc in /Library/WebServer/
Documents/dCMS/test.php on line 6
y/no/abcd


Previous Comments:
------------------------------------------------------------------------

[2006-07-22 13:05:32] [EMAIL PROTECTED]

Works fine for me. Try adding error_reporting(E_ALL); as first line in
your script and try again.

------------------------------------------------------------------------

[2006-07-22 10:39:17] martin dot dreier at web dot de

Description:
------------
When trying to set a variable from a function return value, 
this variable is not set. I am using a local Apache 1.3.3 on a 
Mac OS X 10.4.7 Client.

Reproduce code:
---------------
<?php
$abc = $_SERVER['HTTP_HOST'];
echo $_SERVER['HTTP_HOST'] . "x";
echo "/";
echo $abc . "y";
echo "/";
echo isset($abc) ? "yes" : "no";
echo "/";
$abc = "abc";
echo $abc . "d";
exit;
?>

Expected result:
----------------
127.0.0.1x/127.0.0.1y/yes/abcd

Actual result:
--------------
127.0.0.1x/y/no/abcd


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38185&edit=1

Reply via email to