#38185 [Opn->Fbk]: variables not set from function

From: Date: Sat, 22 Jul 2006 13:05:32 +0000
Subject: #38185 [Opn->Fbk]: variables not set from function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99748@lists.php.net to get a copy of this message
ID: 38185 Updated by: sniper@php.net Reported By: martin dot dreier at web dot de -Status: Open +Status: Feedback Bug Type: Output Control Operating System: Mac OS X 10.4.7 PHP Version: 5.1.4 New Comment: Works fine for me. Try adding error_reporting(E_ALL); as first line in your script and try again. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#99748) next »