Req #70787 [NEW]: mysqli_stmt::bind_param() needs the âreadyâ variables only
From: it_poz at interia dot eu
Operating system: irrelevant
PHP version: Irrelevant
Package: MySQLi related
Bug Type: Feature/Change Request
Bug description:mysqli_stmt::bind_param() needs the âreadyâ variables only
Description:
------------
The mysqli_stmt::bind_param() needs the âreadyâ variables but
doesnât accept the parameters as results â in such cases PHP parser
outputs the Fatal error: Uncaught Error: âCannot pass parameter 2 by
referenceâ
Test script:
---------------
Example 1 (it works):
$stmt->bind_param('i', 1)
Example 2 (it doesnât work and Fatal error is signaled):
$stmt->bind_param('i', ($i + 1))
Expected result:
----------------
I would expect this method working with the parameterâs values
calculated in real time, not just only with âreadyâ values.
Actual result:
--------------
Uncaught Error: Cannot pass parameter 2 by reference - for the code
example 2
--
Edit bug report at https://bugs.php.net/bug.php?id=70787&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70787&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70787&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70787&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70787&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70787&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70787&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70787&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70787&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70787&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70787&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70787&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70787&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70787&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70787&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70787&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70787&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70787&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70787&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70787&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70787&r=mysqlcfg
Thread (2 messages)
- it_poz at interia dot eu