magic_quotes_gpc behaviour

From: Date: Sat, 07 Apr 2007 14:19:24 +0000
Subject: magic_quotes_gpc behaviour
Groups: php.internals 
Request: Send a blank email to internals+get-28706@lists.php.net to get a copy of this message
Hi all, I'm curious about something with magic_quotes_gpc - it ignores the keys of array values in $_GET etc, despite escaping keys of scalar values and all keys in contained arrays. For example, the query string ?a'b=1 yields $_GET[a\'b] = 1, but ?a'b[a'b]=1 yields $_GET[a'b][a\'b] = 1. While many other aspects of magic_quotes_gpc have changed, this behaviour seems to have stayed the same since at least PHP 4.2.0, see: http://www.rajeczy.com/compat_gpc_tests.txt So, is this behaviour deliberate, and if so, what's the rationale? Arpad

« previous php.internals (#28706) next »