|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-06-29 18:02 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 14 22:00:01 2025 UTC |
Description: ------------ sorry, that this is repeat. It is as #18274, #8702 bags and we wont solution this problem. We wont use this construction becouse this have common sense. We wont use result as argument if it possible. I create same object and use in metod this code, but it create error. class MyClass { function Some_One_Function() { if (!empty($this->MyFunction())) echo 'Some one'; //this error? } function MyFunction() { return true;} } But in all changes I very like PHP. Thank you for all. Reproduce code: --------------- class MyClass { function Some_One_Function() { if (!empty($this->MyFunction())) echo 'Some one'; //this error? } function MyFunction() { return true;} } Expected result: ---------------- Parse error: parse error, unexpected '(', expecting ')' in ... And I now use: class MyClass { function Some_One_Function() { $em=empty($this->MyFunction(); if (!$em)) echo 'Some one'; } function MyFunction() { return true;} } But it isn't logic! Actual result: -------------- I think, that if it worked, it would be very convenient.