#43928 [Com]: Using periods in encapsulated variables returns white page

From: Date: Thu, 24 Jan 2008 15:01:30 +0000
Subject: #43928 [Com]: Using periods in encapsulated variables returns white page
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121511@lists.php.net to get a copy of this message
ID: 43928 Comment by: arnaud dot lb at gmail dot com Reported By: david dot reade at sbhelp dot co dot uk Status: Open Bug Type: Variables related Operating System: CentOS 5.1 PHP Version: 5.2.5 New Comment: PHP replaces "." with "_" in variables names. Try isset($_GET['this_is_a_test']) ;) Previous Comments: ------------------------------------------------------------------------ [2008-01-24 14:55:26] david dot reade at sbhelp dot co dot uk Reproduce code should actually read: <?php if(isset($_GET['this.is.a.test'])) { echo('It works!'); exit(); } if(isset($_GET['this;is;a;test'])) { echo('It works!'); exit(); } if(isset($_GET['this:is:a:test'])) { echo('It works!'); exit(); } ?> ------------------------------------------------------------------------ [2008-01-24 14:54:08] david dot reade at sbhelp dot co dot uk Description: ------------ Using dots in queries, e.g. "/index.php?this.is.a.test", which returns a white page with no error, even with 'error_reporting(E_ALL)'. However using any other symbol, such as a colon, returns the correct result. Reproduce code: --------------- <?php if(isset($_GET['this.is.a.test'])) { echo('It works!'); exit(); } if(isset($_GET['this;is;a;test'])) { echo('It works!'); exit(); } if(isset($_GET['this;is;a;test'])) { echo('It works!'); exit(); } ?> Expected result: ---------------- It works! Actual result: -------------- /index.php?this.is.a.test = <white page, no error> /index.php?this;is;a;test = 'It works!' /index.php?this:is:a:test = 'It works!' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43928&edit=1

« previous php.bugs (#121511) next »