Search
583 results · page 3 of 30
-
Marcus Boerger ·
Hello dharana, Thursday, January 8, 2004, 1:09:13 AM, you wrote: Hello Ken, I started using the php5 new dom extension like this: -- <?php asort(get_class_methods(new domDocument)); foreach ($ar_methods as $method) echo $method.'<br />'; ?>> I …
-
Tal Peer ·
… an extra field to the zend_module_entry struct to enable extension writers to specify additional function entries (eg. class methods entries). That will enable get_extension_funcs to return information about classes defined in the extension, and not only …
-
damian.jozwiak.lodz@gmail.com ·
… quite naturally into such an API. With the current function-based API, callers can already explicitly invoke their own conversion methods before passing values to the CSV functions: Csv\array_to_row([ $object->toCsvField(), ]); This provides explicit control over the …
-
Larry Garfield ·
take a cue from Kotlin and C#: Extension functions. Attach method-ish behavior to any type. I like it, and it's a real answer to the mechanics question, not just the set one. Two honest things before I …
-
Rowan Tommins ·
… it would be significantly better for that purpose than what we have now, because there would be a lot fewer methods than there are current option constants. Firstly, because most of the methods would cover multiple overlapping or related options …
-
Niels Dossche ·
Hi Robert Hi Niels, They are indeed going to be very similar, but at least having better return types would be good to give one particular example. e.g. we currently have a lot of methods that can return an …
-
tim@bastelstu.be ·
… my "sibling email": I would not underestimate the "advertising" power of having something included in the language and thus by extension being included in the PHP documentation and naturally seeping into various tutorials. The fact that I came across Java …
-
tim@bastelstu.be ·
Hi pickArrayKeys [but the opposite would not be so], and I don't think that adding both methods to Randomizer is desirable either [better keep it simple/minimal]). Agreed. I think it's best to leave pickArrayKeys() as it is …
-
Go Kudo ·
2022年6月18日(土) 4:16 Tim Düsterhus tim@bastelstu.be: Hi For the reasons stated above, we will abandon the addition of new methods. sorry. Okay, that's fine for me, no problem. str_shuffle() and …
-
me@jhdxr.com ·
… At least, I know of several production codes that use the result of mt_rand() with no arguments.) These two methods confused me at first as well, but I think it's ok with me after I check the documentation …
-
Dan Ackroyd ·
… branch shows how to do a separate thing. Adding a class is on this branch: https://github.com/ThomasWeinert/php-extension-sample/tree/class_method Though you would need the ZEND_ACC_STATIC flag for the method entry also. Also …
-
Rowan Collins ·
… same extension function. Since PHP has no separate build process, it's perfectly possible to do this: // Library A defines extension function in a.php function PDO->magic(){ return 'magic'; } // Library B defines extension function in b.php function PDO …
-
Stephen Reay ·
Hello. I want to do RFS proposal for new language concept - Class extension functions. Syntax will looks like: function DateTime->localTime() { return $this->format('H:i'); } $date = new DateTime(); echo $date->localTime(); Realisation draft already written ( https://github.com …
-
O'Neil Delpratt ·
… a refcount to the XdmNode object, but maybe I am wrong. What's the shortest possible script you can reproduce the leak with? Is (new XQueryProcessor()) enough? Do you need to call particular methods (like this one) with certain args?
-
Adam Baratz ·
That change was implemented in the SQLite3 extension without a RFC, so I'm quite confused here. My literal reading of the contribution guide[1] is that new features should be preceded by an RFC, though there are certainly …
-
Anatol Belski ·
Hi Philip, -----Original Message----- From: Philip Hofstetter [mailto:phofstetter@sensational.ch] Sent: Thursday, July 2, 2015 3:35 PM To: PHP internals Subject: [PHP-DEV] date extension / Type Hinting Hi, as this probably requires some discussion, I'm coming here …
-
Alexander Lisachenko ·
… of unnecessary wrapper classes. I think that PHP is ugly enough :) We should try to use namespaces and classes with methods to provide a better experience for user land developers. Classes allow for logical composition of common functionality, provides autocompletion …
-
Stanislav Malyshev ·
… around. That looks like much bigger can of worms. I.e. would these classes be immutable? Would we ban functions/methods from having static vars? How would we achieve that? etc. etc. Embedded text sections. It's possible to place …
-
O'Neil Delpratt ·
… find code below: I have commented out my attempt to do some thread safety. I have cut out some PHP_METHODS to ease the readability. If you need to build the php extension yourself and require the full project C …
-
Nikita Popov ·
… Many of you internals probably know the APIs needed to do these things: - Create a class with public/private/protected methods - thus making a class final. - Being able to store a pointer to forgein objects into the class, to re …