Bug #66331 [NEW]: ZEND_SEND_PREFER_REF issue trying to overlad

From: Date: Fri, 20 Dec 2013 14:46:53 +0000
Subject: Bug #66331 [NEW]: ZEND_SEND_PREFER_REF issue trying to overlad
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183419@lists.php.net to get a copy of this message
From: remi Operating system: irrevelant PHP version: 5.5.7 Package: *General Issues Bug Type: Bug Bug description:ZEND_SEND_PREFER_REF issue trying to overlad Description: ------------ When trying to overload a class, with function where parameters have ZEND_SEND_PREFER_REF Ex : Memcached::get() in version 2.2.0b1 ZEND_BEGIN_ARG_INFO_EX(arginfo_get, 0, 0, 1) ZEND_ARG_INFO(0, key) ZEND_ARG_INFO(0, cache_cb) ZEND_ARG_INFO(2, cas_token) ZEND_ARG_INFO(1, udf_flags) ZEND_END_ARG_INFO() Real use case: try to mock the class using PHPUnit for test suite. See https://github.com/symfony/symfony/issues/9797 Test script: --------------- <?php class MyMemcached extends memcached { public function get($key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) { } } Expected result: ---------------- No error. Actual result: -------------- Strict standards: Declaration of MyMemcached::get() should be compatible with Memcached::get($key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) in /tmp/foo.php on line 5 -- Edit bug report at https://bugs.php.net/bug.php?id=66331&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66331&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66331&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66331&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66331&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66331&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66331&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66331&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66331&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66331&r=support Expected behavior: https://bugs.php.net/fix.php?id=66331&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66331&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66331&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66331&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66331&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66331&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66331&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66331&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66331&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66331&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66331&r=mysqlcfg

« previous php.bugs (#183419) next »