|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-05-23 02:48 UTC] aharvey@php.net
-Status: Open
+Status: Wont fix
[2014-05-23 02:48 UTC] aharvey@php.net
[2014-05-24 14:52 UTC] anon at anon dot anon
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 14:00:02 2025 UTC |
Description: ------------ class a { protected function method_a(someClass $obj) { /// some code } } $a = new a(); $a->method_a('hellow'); //this throws an error Test script: --------------- class a { protected function method_a(someClass $obj) { /// some code } } $a = new a(); $a->method_a('hellow'); //this throws an error Expected result: ---------------- could be grate if there is possiblity to write like class a { protected function method_a(someClass $obj) throws someException { /// some code } } try { $a = new a(); $a->method_a('hellow'); }catch (someException $e){ //catch exception } Actual result: -------------- throwing fatal error