|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-21 22:45 UTC] christian dot mueller at dfpx dot de
[2005-09-22 01:01 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 06:00:01 2025 UTC |
Description: ------------ When using PDO::ATTR_STATEMENT_CLASS the statement object is an object of the user defined class but it's not possible to access it's (non-pdo) methods Reproduce code: --------------- <?php $pdo = new PDO("pgsql:user=zrm dbname=zrm host=localhost"); class myStatement extends PDOStatement { function foo() { echo __METHOD__; } } $opts = array(); $opts[PDO::ATTR_STATEMENT_CLASS] = array('myStatement'); $r = $pdo->prepare('SELECT login_id FROM logins', $opts); var_dump($r->foo()); ?> Expected result: ---------------- myStatement::foo() Actual result: -------------- Fatal error: Call to undefined method myStatement::foo()