|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-03-13 04:52 UTC] phpbugs at wayoverthere dot com
Description:
------------
Exact(?) same bug as #43663, except connecting to a MySQL 5 server. I
have also tried a 5.3 snapshot & got the same result. Tried both cgi
and cli.
Reproduce code:
---------------
<?php
class test extends PDO {
function __call($name, array $args) {
echo "Called $name in ".__CLASS__.'<br>';
}
function foo() {
echo "Called foo in ".__CLASS__.'<br>';
}
}
$a = new test('mysql:dbname=test;host=localhost','user','pw');
$a->foo();
$a->bar();
?>
Expected result:
----------------
"Called foo in test
Called bar in test"
Actual result:
--------------
"Called foo in test
Fatal error: Call to undefined method test::bar() in call.php on
line 24"
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
I have compiled directly from a CVS checkout (PHP_5_3) on openSuse 10.2, and I still see this problem. Is there anything I can do to convince someone that this bug actually exists? I don't understand how I'm the only one who can reproduce it, when I can reproduce it anywhere I test it - even using the precompiled Windows snapshots. I followed the instructions on compiling from CVS (meaning compiling all the specific version requirements of autoconf, etc. and running buildconf), and used these configure options: ./configure --prefix=/home/shared/php5cvs/ --with-zlib --with-mysql=shared --enable-pdo=shared --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-sqlite=shared My php.ini: extension=pdo.so extension=pdo_mysql.so extension=pdo_sqlite.so Running this test script: <?php class test extends PDO { function __call($name, array $args) { echo "Called $name in ".__CLASS__.'<br>'; } function foo() { echo "Called foo in ".__CLASS__.'<br>'; } } $sqlite = new test('sqlite::memory:'); $sqlite->foo(); $sqlite->bar(); $mysql = new test('mysql:dbname=test;host=localhost','root',''); $mysql->foo(); $mysql->bar(); ?> Gives: Called foo in test<br>Called bar in test<br>Called foo in test<br> Fatal error: Call to undefined method test::bar() in /home/shared/php5cvs/test.php on line 17 If necessary, I might be able to provide ssh access to one of the boxes I'm seeing this on.