|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-24 11:01 UTC] derick@php.net
[2005-09-24 20:18 UTC] stewey at ambitious dot ca
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 01:00:01 2025 UTC |
Description: ------------ Unable to extend the PDO class because __construct is final. Reproduce code: --------------- class MyPDO extends PDO { function __construct($dsn, $user, $pass) { parent::__construct($dsn, $user, $pass); } } $PDO = new MyPDO($dsn, $user, $pass); Expected result: ---------------- I would expect to be able to extend PDO. I realize that this is intended behavior to avoid a SEGV, but I think that there are legitimate reasons why people would want to extend PDO. Is it possible to address this a different way? Actual result: -------------- Fatal error: Cannot override final method PDO::__construct() in myfile on line myline