Bug #69880 [NEW]: strict error
| From: | roberto at spadim dot com dot br | Date: | Thu, 18 Jun 2015 22:55:00 +0000 |
| Subject: | Bug #69880 [NEW]: strict error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-193673@lists.php.net to get a copy of this message | ||
From: roberto at spadim dot com dot br
Operating system: linux
PHP version: 5.6.10
Package: *General Issues
Bug Type: Bug
Bug description:strict error
Description:
------------
Hi guys, i received a strict error, but i`m confused what function
received...
Why I'm receiving a variables should be passed by reference when i use
t($a=1)? the t() function received 1, or the variable $a with value = 1?
Test script:
---------------
<?php
error_reporting(E_ALL);
function t(&$a){}
t($a=1); /// should not receive error!! t() received ($a=1)? or t
received (1) without variable $a reference?
?>
[beto@conquista2 ~]# php t.php
PHP Strict Standards: Only variables should be passed by reference in
/home/beto/t.php on line 5
Strict Standards: Only variables should be passed by reference in
/home/beto/t.php on line 5
Expected result:
----------------
no errors
Actual result:
--------------
PHP Strict Standards: Only variables should be passed by reference in
/home/beto/t.php on line 5
--
Edit bug report at https://bugs.php.net/bug.php?id=69880&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69880&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69880&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69880&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69880&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69880&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69880&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69880&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69880&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69880&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69880&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69880&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69880&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69880&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69880&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69880&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69880&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69880&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69880&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69880&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69880&r=mysqlcfg