|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-26 19:27 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 22:00:01 2025 UTC |
Description: ------------ When extending PDOStatement, it looks like PHP's engine doesn't know anything about a possible __call() method into it. #43663 was the same but for PDO instances Reproduce code: --------------- class Mystatement extends PDOStatement { public function __call($m, $a) { echo "called $m"; } } $pdo = new PDO('mysql:host=localhost;dbname=myDB','login','secret'); $pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Mystatement')); $s = $pdo->query("SELECT * FROM members"); // should be OK $s->idontexist(); Expected result: ---------------- called idontexist Actual result: -------------- Fatal error: Call to undefined method Mystatement::idontexist() in XXX on line xxxx