Call-time pass-by-reference does not generate E_DEPRECATED error
<p>I'm encountering a consistency issue with an <code>E_DEPRECATED</code> message.</p>

<p>I have the following snippet of code that can be run on the command-line to demonstrate.</p>

<pre>
php -d error_reporting=-1 -d display_errors=1 -r 'function foo(&$bar) {return $bar->title . ".";} $bar = new stdClass(); $bar->title = "foobar"; print foo(&$bar) . PHP_EOL . PHP_VERSION . PHP_EOL;'
</pre>

<p>Readable version:</p>

<pre><code>// error reporting set to E_ALL via command-line
function foo(&amp;$bar) {
  return $bar-&gt;title . ".";
} 

$bar = new stdClass(); 
$bar-&gt;title = "foobar"; 

print foo(&amp;$bar) . PHP_EOL . PHP_VERSION . PHP_EOL;
//        ^ this should raise E_DEPRECATED
</code></pre>

<p>I'm trying to trigger a <code>PHP Deprecated:  Call-time pass-by-reference has been deprecated</code> message with this snippet <code>foo(&amp;$bar)</code> but for some reason it's not being raised on my local install.</p>

<p>I've passed it around to several other environments running various versions of php, different os's etc. and gotten different results:</p>

<p>EXPECTED:</p>

<pre>
mike@server:~$ php -d error_reporting=-1 -d display_errors=1 -r 'function foo(&$bar) {return $bar->title . ".";} $bar = new stdClass(); $bar->title = "foobar"; print foo(&$bar) . PHP_EOL . PHP_VERSION . PHP_EOL;'
PHP Deprecated:  Call-time pass-by-reference has been deprecated in Command line code on line 1
foobar.
5.3.5-1ubuntu7.2
</pre>

<p>IN MY ENVIRONMENT:</p>

<pre>
mike@local:~$ php -d error_reporting=-1 -d display_errors=1 -r 'function foo(&$bar) {return $bar->title . ".";} $bar = new stdClass(); $bar->title = "foobar"; print foo(&$bar) . PHP_EOL . PHP_VERSION . PHP_EOL;'
foobar.
5.3.5-1ubuntu7.2
</pre>

<p>What could be causing this?</p>

<h3>Update:</h3>

<p>I did the following to verify that deprecated errors are still being thrown in my environment:</p>

<pre>
mike@local:~$ php -d error_reporting=-1 -d display_errors=1 -r 'eregi("test", "test");'

Deprecated: Function eregi() is deprecated in Command line code on line 1
</pre>
