سؤال

I'm writing a class where I need to have an OR and an AND function declared. If I declare it the normal way i get the following error message:

Parse error: parse error, expecting `"identifier (T_STRING)"' in /Users/... on line 53

What's the correct way to achieve this in php? (Callable OR and AND functions)

هل كانت مفيدة؟

المحلول

PHP doesn't support operator overloading so you can't do that.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top