|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-21 16:36 UTC] basilio dot vera at softonic dot com
[2008-07-21 16:38 UTC] basilio dot vera at softonic dot com
[2008-07-21 17:27 UTC] jani@php.net
[2008-07-21 21:08 UTC] jani@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 17:00:01 2025 UTC |
Description: ------------ Can't extend the method "bind_param" of the mysqli_stmt class without strict errors. Through reflection I see that the method declaration has one declared and needed parameter: -- Parameter #0: { Class: NULL Allows NULL: false Passed to by reference: false Is optional?: no } What can I do to avoid this notice? Reproduce code: --------------- class myTry1 extends mysqli_stmt { public function bind_param() { } } class myTry2 extends mysqli_stmt { public function bind_param( $types ) { } } class myTry3 extends mysqli_stmt { public function bind_param( $types, $var1 ) { } } class myTry4 extends mysqli_stmt { public function bind_param( $types, &$var1 ) { } } Expected result: ---------------- No errors with at least one ot these new classes. Actual result: -------------- Strict Notice Declaration of myTry1::bind_param() should be compatible with that of mysqli_stmt::bind_param() in... Strict Notice Declaration of myTry2::bind_param() should be compatible with that of mysqli_stmt::bind_param() in... Strict Notice Declaration of myTry3::bind_param() should be compatible with that of mysqli_stmt::bind_param() in... Strict Notice Declaration of myTry4::bind_param() should be compatible with that of mysqli_stmt::bind_param() in...