Bug #71947 [NEW]: Bizarre behavior oci8 with call_user_func_array

From: Date: Fri, 01 Apr 2016 17:22:11 +0000
Subject: Bug #71947 [NEW]: Bizarre behavior oci8 with call_user_func_array
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200296@lists.php.net to get a copy of this message
From: sergei dot solomonov at gmail dot com Operating system: Ubuntu 15.04 PHP version: 7.0.5 Package: OCI8 related Bug Type: Bug Bug description:Bizarre behavior oci8 with call_user_func_array Description: ------------ Os info: Ubuntu 15.04, Linux 4.2.0-19-generic Php version: 7.0.5 Configure command: './configure' '--enable-zip' '--enable-intl' '--with-oci8' '--disable-cgi' '--with-apxs2=/usr/local/apache/bin/apxs' '--enable-opcache' '--enable-sigchild' '--enable-mbstring' '--with-xsl' '--with-gd' '--with-config-file-scan-dir=/usr/local/apache/conf' '--with-openssl' '--with-curl' '--with-zlib' '--enable-timezonedb' Php ini: php.ini-production, no changes I'm in migrating process from php 5.6.9 to 7.0.5. I noticed very strange errors with oci8 + call_user_func_array functions. Test script shows how to get other bind value rather then you were supplied as a parameter. If you'll try to do some little changes you may have different results. Also I had a segfaults, but now I can't reproduce it. Test script: --------------- class dbTest { private $stmt; public function __construct() { $conn = oci_connect('user', 'password', 'dbmane'); $this->stmt = oci_parse($conn, 'select :bindValue as result from dual'); } public function runOciFunc($funcName, array $funcArgs) { call_user_func_array("oci_$funcName", $funcArgs); } public function bindVal(array $bind) { foreach ($bind as $k => $v) { $this->runOciFunc('bind_by_name', [$this->stmt, ':bindValue', &$v]); } return $this; } public function execute() { $this->runOciFunc('execute', [$this->stmt]); return $this; } public function result() { var_dump(oci_fetch_assoc($this->stmt)); } } (new dbTest)->bindVal(['expected value']) ->execute() ->result(); Expected result: ---------------- array(1) { ["RESULT"]=> string(14) "expected value" } Actual result: -------------- array(1) { ["RESULT"]=> string(11) "oci_execute" } -- Edit bug report at https://bugs.php.net/bug.php?id=71947&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71947&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71947&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71947&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71947&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71947&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71947&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71947&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71947&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71947&r=support Expected behavior: https://bugs.php.net/fix.php?id=71947&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71947&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71947&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71947&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71947&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71947&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71947&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71947&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71947&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71947&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71947&r=mysqlcfg

« previous php.bugs (#200296) next »