Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP 5.3 deprecation messages showing up as warnings
    text
    copied!<p>I have a legacy app that requires <code>register_globals</code> and <code>magic_quotes_gpc</code> to be enabled. I have my <code>error_reporting</code> set to <code>E_ALL &amp; ~E_DEPRECATED</code> because I still want to see any warnings.</p> <p>When I run the PHP CLI I get the following</p> <pre><code>$ php -d "error_reporting=E_ALL &amp; ~E_DEPRECATED" -v PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP 5.3.3 (cli) (built: Mar 30 2011 13:51:41) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans </code></pre> <p>Why is it showing the deprecation messages as warnings? Shouldn't they be in the <code>E_DEPRECATED</code> level?</p> <p>It seems I have to not show warnings to get them to go away</p> <pre><code>$ php -d "error_reporting=E_ALL &amp; ~E_WARNING" -v PHP 5.3.3 (cli) (built: Mar 30 2011 13:51:41) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans </code></pre> <p>I could change my <code>error_reporting</code> to <code>E_ALL &amp; ~E_DEPRECATED &amp; ~E_WARNING</code> but then it wouldn't show warnings for my webapp. Any suggestions? Do I have to use a separate <code>php.ini</code> for the CLI?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload