#23630 [NEW]: Variable parsing issue within strings

From: Date: Wed, 14 May 2003 20:18:06 +0000
Subject: #23630 [NEW]: Variable parsing issue within strings
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39665@lists.php.net to get a copy of this message
From:             nicolas at van-lancker dot be
Operating system: Mandrake 9.1
PHP version:      4.3.1
PHP Bug Type:     Strings related
Bug description:  Variable parsing issue within strings

According to the doc :

Variable parsing
When a string is specified in double quotes or with heredoc, variables are
parsed within it. 

Testcode :

<html>
<body>
<a href="test.php?MyVar=PHP">Link</a>
<br>
<?php
	if($_GET['MyVar']) { 
		echo "Simple test : $_GET['MyVar']"; 
	}
?>
</body>
</html>

When clicking on the link result :

Link 
Simple test : 


So the $_GET['MyVar'] variable was not parsed within the string. 

Seems to me that this incorrect behaviour...
Or there might be reason to explain this, but then it should be noted in
the documentation...?

Greetz,
Nicolas

-- 
Edit bug report at http://bugs.php.net/?id=23630&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23630&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23630&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23630&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23630&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23630&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23630&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23630&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23630&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23630&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23630&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23630&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23630&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23630&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23630&r=gnused



Thread (2 messages)

« previous php.bugs (#39665) next »