To deprecate or not to deprecate

As of version 5.3 of PHP, certain features and functions are [considered deprecated][1]. It comes with the territory. In major version changes, new features are added while old stuff is discarded. Unsurprisingly – and lucky for me, with that change in versions comes yet another WTF for me to rant about.

[1]: http://www.php.net/manual/en/migration53.deprecated.php

## magic_quotes_gpc is deprecated, is it not?

The PHP manual [warns us][2] not to rely on certain settings as of PHP 5.3.0 because they’ve been ***deprecated***. This is the case with `magic_quotes_gpc`. Keeping this configuration directive in a `php.ini` will certainly produce an `E_DEPRECATED` warning:

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

I was irritated however, when I took a look at the results of `phpinfo()` spilling guts:

The output has been generated like so:

gore@ghoti:~/.temp# echo '<?php phpinfo();' > phpinfo.php
gore@ghoti:~/.temp# PHPRC=/dev/null php5 -n phpinfo.php > phpinfo.html

From this, one can see that

1. in order to read default values *only*, I made doubly sure that absolutely no `php.ini` would be parsed.
2. a setting – regarded *deprecated* – defaults to *On*.

WTF.

[2]: http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc