Re: [PHP-DEV] Expose pdo_parse_params to userspace

2023-10-11 Thread Karoly Negyesi
eems a very good fit , where can I read / help on problems with this pairing? Thanks Karoly Negyesi On Wed, Oct 11, 2023 at 5:47 PM Kamil Tekiela wrote: > Hi, > > I have to say I am not a fan of this proposal. While definitely a super > nice feature in PDO, it's more of a hack

[PHP-DEV] Expose pdo_parse_params to userspace

2023-10-11 Thread Karoly Negyesi
nk? If the maintainers of the project agree to the idea I can take a stab at coding this. It can't be too hard (famous last words). Thanks Karoly Negyesi

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Karoly Negyesi
ry Garfield wrote: > On Tue, Jul 18, 2023, at 4:41 PM, Karoly Negyesi wrote: > > So. Let's get back to pipelines. > > > > I wrote this email because I was manipulating a robots meta tag string: > > > > $robots_array = explode(', ', $robots_string);

Re: [PHP-DEV] pipes, scalar objects and on?

2023-07-18 Thread Karoly Negyesi
n, Jul 17, 2023, at 7:07 PM, Olle Härstedt wrote: > >> 2023-07-17 18:58 GMT+02:00, Larry Garfield : > >>> On Mon, Jul 17, 2023, at 2:57 PM, Olle Härstedt wrote: > >>>> 2023-07-17 14:25 GMT+02:00, Karoly Negyesi : > >>>>> Hi, > >>>&g

[PHP-DEV] pipes, scalar objects and on?

2023-07-17 Thread Karoly Negyesi
Hi, I tried to read on why the pipe RFC failed but by and large I also failed. The discussion on https://github.com/php/php-src/pull/7214 is very short. https://externals.io/message/114770 is not so short but it seems not to cover the latest version which uses first class functions? Could someo

[PHP-DEV] Steal labelled break and continue from zig?

2023-02-27 Thread Karoly Negyesi
Hello, As I was reading https://kristoff.it/blog/zig-multi-sequence-for-loops/ I found a very nice trick which in PHP would be: foo: while ($i--) { if ($ % 2) break foo; } What do you think? Charlie

Re: [PHP-DEV] Please allow an out of readonly properties

2022-12-03 Thread Karoly Negyesi
g-term, for everyone 😛 > > On Sat, 3 Dec 2022, 23:45 Karoly Negyesi, wrote: > >> I do not have the luxury of designing my own system. I am forced to use >> upstream. I can't help it and given the history of private usage and the >> refusal on relaxing them I do no

Re: [PHP-DEV] Please allow an out of readonly properties

2022-12-03 Thread Karoly Negyesi
constraints to fit your system instead. > > Marco Pivetta > > https://twitter.com/Ocramius > > https://ocramius.github.io/ > > > On Sat, 3 Dec 2022 at 23:39, Karoly Negyesi wrote: > >> Hello, >> >> If push comes to shove, private properties can be change

[PHP-DEV] Please allow an out of readonly properties

2022-12-03 Thread Karoly Negyesi
Hello, If push comes to shove, private properties can be changed with reflection. Readonly properties can't. Please add a readonly toggle to reflection. Thanks Karoly Negyesi

[PHP-DEV] Again: Asymmetric Visibility and Accessor syntax

2022-09-18 Thread Karoly Negyesi
> We are therefore going to proceed with `public private(set)`, the same syntax as Swift and the current RFC text use. It seems my previous email went to /dev/null. This is incomprehensible. Go with public(get) private(set) please. "public private" makes no sense.

Re: [PHP-DEV] [RFC] Asymmetric visibility

2022-09-02 Thread Karoly Negyesi
Hello, public private(set) string $bar; This is extremely weird to read and especially with the future operations, very hard to understand too. I would strongly recommend explicit over implicit and use instead public(get) private(set) string $bar; Now that's quite clear. Thanks NK

[PHP-DEV] instance version of match ?

2022-03-28 Thread Karoly Negyesi
ity here for the casual reader or is it just me who thinks no other sensible reading is possible? Thanks for your consideration. Karoly Negyesi

Re: [PHP-DEV] A little syntactic sugar on array_* function calls?

2021-05-25 Thread Karoly Negyesi
to implement, narrow quickfix. (Although users can add array_foobar($array, $arg1...) for $array->foobar($arg1) as they need.) Karoly Negyesi

[PHP-DEV] A little syntactic sugar on array_* function calls?

2021-05-25 Thread Karoly Negyesi
syntax ambiguity either but here I am probably just naive. It could also be usable with user defined functions. What do you think? Karoly Negyesi

[PHP-DEV] Package / namespace visibility

2015-11-10 Thread Karoly Negyesi
, Karoly Negyesi

[PHP-DEV] Please unhardwire the streams from opcache

2015-06-30 Thread Karoly Negyesi
chance to override this somehow in PHP 7.1 or even 7.2 since it won't be for a good number of years before we can use it but it would be nice if Drupal 9 didn't need this fun. Thanks much, Karoly Negyesi

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-05 Thread Karoly Negyesi
havior, then again, that needs discussion, do you have any good examples? I am not familiar enough with the bugs to say "here's a bugfix which made foo(NULL) return NULL instead of FALSE" or somesuch. Best, Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-04 Thread Karoly Negyesi
to 5.5 outright because it won't break BC with 5.4. Is this absolutely unattainable? Best regards Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-03 Thread Karoly Negyesi
cast should or should not throw a notice. But, if that's desired behavior, I will add a note to warn people. Best Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-03 Thread Karoly Negyesi
again I'd be glad to discuss on how to behave for those. Regards NK On Sun, Feb 3, 2013 at 2:22 PM, Nikita Popov wrote: > On Sun, Feb 3, 2013 at 12:36 PM, Karoly Negyesi wrote: >> >> Hi, >> >> So, if we are talking about PHP 6, then the opening > accompanie

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-03 Thread Karoly Negyesi
If you mean wrote: > On 02/03/2013 02:03 PM, Karoly Negyesi wrote: >> Well, fixing a segfault, adding a new function or method as it oft >> happened in PHP 5.3 is only breaking forwards compatibility not >> backwards -- if you have code that ran on PHP 5.3.4 it'll run o

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-03 Thread Karoly Negyesi
t relevant to this discussion. So, what about adding a version string to the opening wrote: > On 02/03/2013 01:48 PM, Karoly Negyesi wrote: >>> We do not consider a change [...] a BC break >> >> Let me help: backwards compatibility means a host can upgrade a >> p

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-03 Thread Karoly Negyesi
> We do not consider a change [...] a BC break Let me help: backwards compatibility means a host can upgrade a package without inducing a lot of support tickets. Best, Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-03 Thread Karoly Negyesi
Again in 5.4, using a string offset against a string throws a warning. It wasn't doing that before. If you want I can dig around in our issue queue for more backwards compatibility breaks but there are some. Regards, Karoly Negyesi On Sun, Feb 3, 2013 at 4:19 AM, Pierre Joye wrote: > h

[PHP-DEV] Proposal for serious BC compatibility aka language versioning

2013-02-03 Thread Karoly Negyesi
Hi, So, if we are talking about PHP 6, then the opening

[PHP-DEV] How hard should PHP try to finish a script?

2012-06-17 Thread Karoly Negyesi
Hi, PHP often throws fatal errors when it could throw an exception. Take PHP Fatal error: Non-abstract method foo::bar() must contain body this error for example. It would be possible to mark this class as 'invalid' instead and when doing a new foo , throw an exception. Or if you try really har

[PHP-DEV] session.cache_limiter empty string?

2011-10-11 Thread Karoly Negyesi
s if (PS(cache_limiter)[0] == '\0') return 0; deliberately stop it? Ie. what should I add to the documentation for people who don't want PHP to send anything? Thanks Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Are all HTTP headers registered in SERVER?

2011-09-08 Thread Karoly Negyesi
On Thu, Sep 8, 2011 at 10:20 AM, Uwe Schindler wrote: > Hi, > >> It seems to be the case but this is not documented anywhere on php.net. >> Instead http://php.net/manual/en/function.apache-request-headers.php say >> "You can also get at the value of the common CGI variables by reading them >> from

[PHP-DEV] Are all HTTP headers registered in SERVER?

2011-09-07 Thread Karoly Negyesi
every HTTP header including custom ones can be found In SERVER (with the odd security exceptions)? Thanks Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Major release for BC??

2010-11-27 Thread Karoly Negyesi
kwards compatibility on this list but I still couldnt resist writing this mail. I just wanted to make sure this argument is not used in the PHP 5.4 vs 7.0 'cos it's totally invalid and never was valid in the first place. tl;dr the PHP developers have a false belief in not breaking backwards co

[PHP-DEV] Re: Karoly Negyesi: What do you really want?

2010-07-25 Thread Karoly Negyesi
pporting PHP 5.2. Regards Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Please reconsider supporting PHP 5.2

2010-07-25 Thread Karoly Negyesi
I said 'stable'. Last I have seen http://pecl.php.net/package/apc the latest stable was 3.0.19. Regards Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Please reconsider supporting PHP 5.2

2010-07-25 Thread Karoly Negyesi
> Extensions. APC to this day does not have a stable release for PHP > 5.3. Neither has XCache. I am not even sure how do you imagine > *anyone* much less everyone upgrading to 5.3 with a production site > without a stable code cache...? Sorry, apparently XCache 1.3 version does work with 5.3 it's

[PHP-DEV] Re: Please reconsider supporting PHP 5.2

2010-07-25 Thread Karoly Negyesi
>> Where previously the function would accept the by-value argument, a >> fatal error is now emitted. > Not sure about this one. Do you have an example please? Erm, you do realized that I copied that from the handbook page? Example: PHP Fatal error: Only variables can be passed by reference in

[PHP-DEV] Please reconsider supporting PHP 5.2

2010-07-25 Thread Karoly Negyesi
rcing everyone to switch to another major version a mere two years after EOLing PHP4. That's fast... too fast. Kind regards Karoly Negyesi Disclaimer: this email only reflects my own personal opinion. Even if that. -- PHP Internals - PHP Runtime Development Mailing List To unsubscri

Re: [PHP-DEV] Remove variable function and method calls

2010-07-23 Thread Karoly Negyesi
> This is plain false. PHP does care for BC a lot. OK. I will try to test PHP to help you guys in this. I know there is documentation but it often misses crucial subtle points and there is not a lot of education of the public to set expectations. In other words, how can I help best? If I try to r

Re: [PHP-DEV] Remove variable function and method calls

2010-07-23 Thread Karoly Negyesi
gement systems suck, Drupal just happens to suck less. -- Boris Mann at DrupalCON Amsterdam, August 2005." http://buytaert.net/drupal-sucks-less Regards Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Remove variable function and method calls

2010-07-23 Thread Karoly Negyesi
I tried. Kind regards Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Remove variable function and method calls

2010-07-22 Thread Karoly Negyesi
On Thu, Jul 22, 2010 at 5:42 PM, Joel Perras wrote: > What's confusing about it? Each expression means something very > different and distinct. > > I use $foo(), new $foo(), classname::$foo, classname::$foo(), > $bar::$foo, $bar::$foo(), etc. on a regular basis, and it can make for > some very ele

Re: [PHP-DEV] Remove variable function and method calls

2010-07-22 Thread Karoly Negyesi
On Thu, Jul 22, 2010 at 4:51 PM, Davey Shafik wrote: > You can call classname::$foo() and even $obj->$foo() with call_user_func(), > should we get rid of those too? Absolutely not. > I grant you that variable function calls are sometimes confusing, lambda > functions are a better way to do it

Re: [PHP-DEV] Remove variable function and method calls

2010-07-22 Thread Karoly Negyesi
> public function __get($subclass) > { >  $include_file = CONTENTLOUNGE_BASEDIR . 'api_' . $subclass . '.php'; >  $class_name   = 'cl_' . $subclass; >  $this->$subclass = new $class_name(); >  return $this->$subclass; > } And this code contains no variable function call. You mixed it up with a var

[PHP-DEV] Remove variable function and method calls

2010-07-22 Thread Karoly Negyesi
_func() is a perfect replacement. Regards Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] An optimization idea

2008-10-19 Thread Karoly Negyesi
lines long. Regards, Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] PHP RFC: closures

2008-06-17 Thread Karoly Negyesi
http://api.drupal.org/api/function/_filter_url_parse_full_links/6 has no reason to exist, it should be lambda, it's called from preg_replace_callback only. So: a resounding yes. Regards Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] making var_dump and var_export even better

2008-03-27 Thread Karoly Negyesi
om print_r and actually write out a reference to the offending piece? Regards, Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Allow func_get_arg(s) to pass by reference

2007-11-18 Thread Karoly Negyesi
ts_args, I do not really know -- maybe a param to take all by ref, similar to EXTR_REFS. Thanks, Karoly Negyesi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bring back call-time pass-by-reference

2007-11-18 Thread Karoly Negyesi
I try to be constructive here -- I might end up as a moron, I do not know, sorry -- but what about adding a parameter to func_get_arg to get the argument by reference? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bring back call-time pass-by-reference

2007-11-18 Thread Karoly Negyesi
http://blog.phpdoc.info/archives/3-PHP-Fun-Variable-Arguments-Be-Reference.html just an example from 2.5yrs ago. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bring back call-time pass-by-reference

2007-11-17 Thread Karoly Negyesi
Dear Brian, Say, you have a CMS which generally calls some kind of functions and some of them might need to modify one array the other needs to modify two arrays... Currently you need to wrap these into a "arguments" array otherwise func_get_args will butcher your references. Regards, NK -- PH

[PHP-DEV] Bring back call-time pass-by-reference

2007-11-17 Thread Karoly Negyesi
Hi, Although this should be an old hat, I am surprised PHP5 has not fixed it, let's fix it in PHP6. There are things you can't without call time pass-by-reference, most of all variables arguments with references. So, please de-deprecate it. Thanks much, Karoly Negyesi -- PHP Inter

[PHP-DEV] A reference problem

2006-04-02 Thread Karoly Negyesi
" } array(1) { ["foo"]=> string(3) "bar" } Is this a bug? Or I miss something? Thanks Karoly Negyesi Ps. There is a good reason for using such ugly reference magic, and I am happy to explain it to anyone who is interested, but it's a long story... -- PHP Internal