Re: [PHP-DEV] Let's allow eval() to be turned off in PHP 8

2019-11-26 Thread Ken Stanley
On Tue, Nov 26, 2019 at 10:53 AM Ian Littman wrote: > What do y'all think about getting this into PHP 8? > So long as the default behavior is to leave it available, I'm okay with this. Any app that relies on twig/twig, phpunit/phpunit, many symfony packages, dompdf/dompdf, etc relies on being ab

Re: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-17 Thread Ken Stanley
On Sun, Nov 17, 2019 at 9:42 AM Aimeos | Norbert Sendetzky < norb...@aimeos.com> wrote: > Since PHP 7.1 there's the "iterable" pseudo type hint that matches > "array" and "Traversable". > > PHP frameworks would profit from support of an "arrayable" pseudo type > hint that matches "array" and all o

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-30 Thread Ken Stanley
made me think about this, and I enjoyed it. I will continue to look for something I can cut my teeth on as a first-time contribution to php core. - Ken Stanley

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
This got rejected for being too large??? On Thu, Oct 24, 2019 at 10:05 PM Ken Stanley wrote: > Now we’re talking. :-) > > This example is better indeed. >> But here I would prefer to have the ?-> operator proposed earlier >> (nullsafe calls). >> >>

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
On Thu, Oct 24, 2019 at 8:54 PM Mike Schinkel wrote: > On Oct 24, 2019, at 6:49 PM, Ken Stanley wrote: > I would be keen to see the more expressive techniques that retain the > succinctness of having a not-null coalescing operator. > > > > When I read your first example, I

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
On Thu, Oct 24, 2019 at 6:01 PM Mark Randall wrote: > On 24/10/2019 22:52, Ken Stanley wrote: > > I'm more interested in having a negation operator for the null-coalescing > > operator, especially since cognatively it should be easy to discern what > it > > does.

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
On Thu, Oct 24, 2019 at 5:31 PM Kosit Supanyo wrote: > Hi Bruce > > If I understand correctly. > > $_SERVER['fname'] !?? $user->setName($_SERVER['fname']); > > > Will return the result of $user->setName($_SERVER['fname']) if > $_SERVER['fname'] is set or null if not set. While: > > isset($_SERV

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
in having a negation operator for the null-coalescing operator, especially since cognatively it should be easy to discern what it does. I've personally not seen |>, and I'd be confused as to what it does (e.g., is it a bitwise OR on a greater than comparison?). Thank you! The idea of $$ is neat, but not quite what I'm trying to achieve here. If anything, wouldn't that facilitate a different RFC? - Ken Stanley

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
On Thu, Oct 24, 2019 at 4:29 PM Andreas Hennings wrote: > On Thu, 24 Oct 2019 at 20:59, Ken Stanley wrote: > > > > On Thu, Oct 24, 2019 at 1:33 PM Dan Ackroyd > wrote: > > > > > On Thu, 24 Oct 2019 at 18:21, Ken Stanley wrote: > > > > > > &g

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
On Thu, Oct 24, 2019 at 1:33 PM Dan Ackroyd wrote: > On Thu, 24 Oct 2019 at 18:21, Ken Stanley wrote: > > > > Since PHP 7.0 brought forward the Null Coalescing Operator (??), writing > > more succinct code for how to handle null values has been a blessing. > But, > &g

Re: [PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
situation (e.g., $userId !?? $bar->getUser($userId())). In fact, I could see this RFC complimenting the nullsafe operator: $userId !?? $bar->getUser($userId)?->getName(). Thank you, Ken Stanley PS. Dan, I am going to respond to your request for a code example; I am taking my time so that I can give you and everyone else a good example. :)

[PHP-DEV] [RFC] anti-coalescing-operator

2019-10-24 Thread Ken Stanley
n SQL. And, as they say, naming is hard. If `anti-coalescing-operator` does not sit well with you all, I am open to naming suggestions. Thank you for your time, Ken Stanley

Re: [PHP-DEV] namespace improvements to be committed very soon - final review

2007-12-11 Thread Ken Stanley
On Dec 11, 2007 6:13 PM, Gregory Beaver <[EMAIL PROTECTED]> wrote: > The example above shows that imported names are reset at each namespace > declaration. There is no prohibition on this code: > > namespace one; { > use Blah::A; > // code > } > namespace two; { > use Foo::A; > // code > } > ?>

Re: [PHP-DEV] Namespace

2007-12-07 Thread Ken Stanley
I understand what you mean, but I was just trying to put a real-world face on a so-far theoretical problem. But that does raise an interesting point; we can already use braces anywhere and everywhere, and while we could easily wrap namespaces in anonymous braces like you describe, why not just go t

Re: [PHP-DEV] Namespace

2007-12-07 Thread Ken Stanley
In regards to the braces or no braces question, I have a scenario that I would like to share that could be considered similar in nature. We use a cluster of databases where I work, and to make things easier on us, we have a method called setSource() to switch between the clusters in our database cl

Re: [PHP-DEV] A rebuttal to Re: RFC: Dropping Namespace

2007-12-06 Thread Ken Stanley
Holy wow. That was fantastic! Not to downplay anything that Stas and the other developers have done -- because let's face it, they've done a fantastic job themselves -- you have definitely risen above and beyond the call of duty and really come up with some very compelling counter-arguments. This r

Re: [PHP-DEV] Namespace

2007-12-05 Thread Ken Stanley
On Dec 5, 2007 3:03 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > What I'm frustrated with is not questions and arguments, but the same > misconceptions about namespaces repeated over and over after it was > explained multiple times it is just not what namespaces are and how they > are supp

Re: [PHP-DEV] Namespace

2007-12-05 Thread Ken Stanley
On Dec 5, 2007 12:54 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > (I don't know how to make it more clear - should I > use blinking text, flash graphics and pictures of dancing girls/boys in > bikinis?) Stas, that is immature, rude, and completely uncalled for; fine, you are frustrated wi

Re: [PHP-DEV] RFC: Dropping Namespace

2007-12-05 Thread Ken Stanley
As a developer and member of the community, the following is my two-cents on the subject: On Dec 4, 2007 5:16 PM, Derick Rethans <[EMAIL PROTECTED]> wrote: > 1. As it is impossible to do "use XXX as NativeClass" we get to the > point where we'd have to namespace new internal native classes >

Re: [PHP-DEV] Quick question before submitting a feature request...

2007-11-23 Thread Ken Stanley
at least be told where to go to fix their mistake? I am only asking to this list because I would hate to submit a ticket that is just going to be closed. :) On Nov 23, 2007 1:09 PM, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 22.11.2007 06:12, Ken Stanley wrote: > > I have &

Re: [PHP-DEV] Quick question before submitting a feature request...

2007-11-22 Thread Ken Stanley
I completely agree with what you and Alexy suggest. I've since refactored my code accordingly so that an exception would not be thrown while inside of an exception. But, that does not answer my original question. I asked about submitting a feature request that would simply provide more information

[PHP-DEV] Quick question before submitting a feature request...

2007-11-21 Thread Ken Stanley
Hello, I have done my best to look through both the internals archive and the bug database, however I feel that I may have missed something; hence this e-mail. I am working on a project that uses set_exception_handler() so that I can attempt to display a uniform error page, perform logging, etc, o

Re: AW: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Ken Stanley
FWIW, I think this is a great feature. Forgive my lack of intimate knowledge with the core and extension, but would this be possible as an extension to PHP? i.e., xdebug modifies how certain internals of PHP work through the zend_extension_ts ini setting. On 10/15/07, Hans Moog <[EMAIL PROTECTED]>

[PHP-DEV] Input File Not Specified Error

2007-08-01 Thread Ken Stanley
Hello! I've been watching this list for a little while, and I am hoping that someone here can point me in the right direction. We, where I work, are running PHP 5.2.3 on 10 Windows Server 2003 sp2 and IIS 6 servers. Also, each IIS server is configured to use the IUSR_SERVERNMAE user for anonymous a

Re: [PHP-DEV] late static binding

2007-06-01 Thread Ken Stanley
That's right. And that's exactly why it's such a bad idea to call it static::. It's the scope resolution operator which already makes them static, not their name. (I'm sorry for catching you on your words ;) ) I agree that it is not the best name, just not as bad as some of the others. :) Tha

Re: [PHP-DEV] late static binding

2007-06-01 Thread Ken Stanley
First of all, thank you to everybody who has responded to my (silly) questions; you have made this subject a lot more understandable. :) static:: seems weird because it implies otherkeyword:: is not static. I think the point that was made from the other posters was that child:: was way too conf

Re: [PHP-DEV] late static binding

2007-05-26 Thread Ken Stanley
On 5/26/07, Mike Lively <[EMAIL PROTECTED]> wrote: It appears that all you are suggesting that is different from what has been discussed previously is purely syntactical. In that regard I would have to say that while neither this:: or static:: are jaw-droppers, child:: seems somewhar counter-int

[PHP-DEV] late static binding

2007-05-26 Thread Ken Stanley
Hi all! I've been researching the current status of late static binding, and I came across this mailing list with a few topics on this subject. After doing the reading, I had a couple of questions that maybe one of the experienced parties involved could help clear up for me. Basically, I am wonde