Req #72712 [Opn->Wfx]: mysqli::bind_param is outdated - parameter binding should be by single array

From: Date: Mon, 26 Sep 2016 14:43:32 +0000
Subject: Req #72712 [Opn->Wfx]: mysqli::bind_param is outdated - parameter binding should be by single array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204283@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72712&edit=1 ID: 72712 Updated by: cmb@php.net Reported by: conradbrinker at gmail dot com Summary: mysqli::bind_param is outdated - parameter binding should be by single array -Status: Open +Status: Wont fix Type: Feature/Change Request Package: MySQLi related Operating System: Ubuntu 16.04 PHP Version: 7.0.9 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: As of PHP 5.6 you can use argument unpacking, e.g. $stmt->bind_param($types, ...$params) Looks good enough to me. [1] <https://wiki.php.net/rfc/argument_unpacking> Previous Comments: ------------------------------------------------------------------------ [2016-07-30 12:25:29] conradbrinker at gmail dot com Description: ------------ MySQLi::bind_param() is still stuck in the old days. We should not have to use call_user_func_array() to bind a referenced array of data to a prepared statement. MySQLi::bind_param() should be like PDO in that we should at least be able to pass a PHP array to it as the second parameter and it will process the request accordingly. Test script: --------------- It's not a bug... it's a feature. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72712&edit=1

« previous php.bugs (#204283) next »