Search
582 results · page 1 of 30
-
Rowan Tommins [IMSoP] ·
Hi, This follows up on the Extension Methods / Scalar Extension Methods RFCs (currently in draft). I'd like to propose allowing extension methods on scalar values to be invoked through property-fetch syntax, with the parentheses omitted. Hi, I …
-
h4acda@qq.com ·
Hi, This follows up on the Extension Methods / Scalar Extension Methods RFCs (currently in draft). I'd like to propose allowing extension methods on scalar values to be invoked through property-fetch syntax, with the parentheses omitted. Proposal: when a …
-
Concept Extension methods
Alex Wells ·
Well, pipe operator is another option, but it’s got it’s downsides compared to extension methods: it's less versatile: extension methods are required to specify a type they’re extending, meaning they are methods, not functions. Hence …
-
Alex \"Pierstoval\" Rock ·
… but not used. With the inclusion of the Visibility RFC, explicit require or require_once is not necessary. The use extension syntax replaces it. The consequence of this is that extension methods are only visible in scopes that explicitly want …
-
condaminet.benoit@gmail.com ·
… or” vs “||”), why not make a shorthand way to write a function that calls a constructor (kinda sorta like C# extension methods)? Something kinda like: class MyClass implements Invocable { public function __construct($i) {} } MyClass($i); Where the Invocable interface defines …
-
tim@bastelstu.be ·
… about conflicting with method names of child classes when updating). It lets people just do something a bit like adding 'extension methods' in C#. I like it. People could write e.g. $bcChildNumber->isPrime() instead of BcNumberUtils::isPrime($bcNumber) Yeah …
-
drealecs@gmail.com ·
… failure. Of course, you could type-hint it array|bool, but the same could be said for |false. Thoughts? Generally I'm fine with also allowing the "true" type. We certainly have quite a few extension methods that return i
-
Rowan Collins ·
I would not vote in favour of a patch that does not include support for AST, that's a completely different feature. Arguably, with the right choice of extension methods, an implementation requiring a single scalar could be extended …
-
Yahav Gindi Bar ·
… of the runkit features should not be included in PHP core but I wish to focus on extending classes with extension methods, constants, traits and members. Just like all other complicated and powerful features in PHP, one should use them …
-
Martin Scotta ·
… as the overhead and the amount of code that would need to be changed in the core and in every extension is daunting. Anybody out there have a patch along these lines? -Rasmus Glad to see pseudo-object methods for …
-
Martin Scotta ·
… worth the implementation overhead (loss of efficiency) it would require. Ben. Martin Scotta Apologies - I wasn't suggesting we implement extension methods. I was simply changing my mind and agreeing with the earlier point that methods for enums can be …
-
Stan Vassilev | FM ·
… WORLD" This is extremely beneficial for lightweight "extension" of classes without subclassing. This feature is identical to the C# .NET "Extension" methods. The best use of it is for selectively extending the primitive type classes on the fly with methods …
-
Steph Fox ·
… again for phph6? That's plain stupid and insane. No. Derick wants to enable all the code in the date extension (methods of the date class and so on). The only way I can see us doing it is by …
-
Joe Watkins ·
Hi! I'm not really sure how documenting (inline) API functions is really going to be any different to the prototypes we all put on extension functions/methods, or any more time consuming, and I don't see how …
-
John Coggeshall ·
Um, that's the type of thing that a quick test could tell you, isn't it? John lets try again in an OOP extension using methods <em>NOT</em> tagged as ZEND_ACC_STATIC, does ZE2 prevent them from …
-
Holly Schilling ·
… for them to support a more robust standard library for them. If implemented as objects, we could use built-in methods or extension functions, but then we have to deal with the passing semantics problem. We could save a lot …
-
Remi Collet ·
… back to 7.0, but that might be negotiable). I'm not a C programmer, and definitely not a PHP extension developer. Some methods in the extension implement Iterator and ArrayAccess, and with 8.1 show deprecation notices, eg: Deprecated …
-
Pierre Joye ·
De : Pierre Joye [mailto:pierre.php@gmail.com] What do you think about the creation of an example extension covering almost everything one would do in an extension? The class, methods or functions do not have to be useful …
-
Jared Williams ·
… setlocale, but at present I've not been able to get anything other than English out of the code. Intl extension has classes/methods for translating dates. http://www.php.net/manual/en/class.intldateformatter.php . Third question In order …
-
Marcus Boerger ·
… I am not sure with you. At first, if you think __call()/__get()/__set() mast conform to uniform prototypes and extension will define methods with another prototypes then PHP should not work with such extensions. Warning is very bed decision …