Re: [PHP-DEV] Changing PECL signup flow.

2019-09-15 Thread Thomas Hruska
anges should allow extensions to be listed on PECL much more easily, without being too disruptive to the PECL site. Thoughts? Sounds good to me. I thought the php.net account was for incorporating new documentation? -- Thomas Hruska CubicleSoft President I've got great, time saving softw

Re: [PHP-DEV] Error when POST / upload limits are exceeded

2019-10-01 Thread Thomas Hruska
parser would allow userland startup sequences to detect the problem globally and cleanly terminate the request BEFORE the core application logic is encountered. This shouldn't just be for files, it should be for any time the parser early-terminates input processing but then proceeds to s

Re: [PHP-DEV] exit() via exception

2019-10-13 Thread Thomas Lamy
Am 11.10.19 um 15:16 schrieb Claude Pache: Le 11 oct. 2019 à 13:05, Nikita Popov a écrit : I'm mainly wondering how exactly we'd go about integrating this in the existing exception hierarchy. Assuming that it is desirable to allow people to actually catch this exception, my first thought woul

Re: [PHP-DEV] Add viable long running execution model to php 8

2020-01-28 Thread Thomas Hruska
CP/IP servers than they are right now. A lot of careful thought needs to happen prior to writing bind(). Network code is quite notably hard to get right and complexity multiplies with multi-OS/platform support. -- Thomas Hruska CubicleSoft President I've got great, time saving soft

Re: [PHP-DEV] Re: [RFC] deprecate md5_file and sha1_file

2020-02-11 Thread Thomas Hruska
are completely fine though for other purposes such as detecting single-bit changes in file data where something a little more robust than CRC32 is needed but don't want to waste a lot of storage space. md5() and sha1() already have basic warnings applied. -- Thomas Hruska CubicleSoft Presid

Re: [PHP-DEV] [RFC] token_get_all() TOKEN_AS_OBJECT mode

2020-02-14 Thread Thomas Hruska
uld be better for RAM usage but I can see how that might be complex to implement and largely not worth it since such scenarios will be rare and require the ability to maintain lexer state externally as you mentioned and would only be used by this part of the software. -- Thomas Hruska Cubicle

Re: [PHP-DEV] Are PECL modules preferable?

2020-03-24 Thread Thomas Hruska
https://github.com/cubiclesoft/ultimate-web-scraper/blob/master/docs/emulate_curl.md On a side note, good PHP userland streams-based implementations are faster than the ext/curl extension. The ext/curl extension also doesn't emit as much useful debugging information. -- Thomas Hruska Cu

Re: [PHP-DEV] Are PECL modules preferable?

2020-03-24 Thread Thomas Hruska
s. Doing that would fix so many Windows loader related issues that people have with getting the precompiled PECL extensions to work on Windows (especially with mixed SAPI environments). -- Thomas Hruska CubicleSoft President I've got great, time saving software that you will find useful.

Re: [PHP-DEV] Simplify classes syntax proposal

2020-05-01 Thread Thomas Hruska
lAv8Q -- Thomas Hruska CubicleSoft President I've got great, time saving software that you will find useful. http://cubiclesoft.com/ And once you find my software useful: http://cubiclesoft.com/donate/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Named arguments

2020-05-05 Thread Thomas Bley
github.com/ Hi, I think it's a valid point that changing parameter names can be a BC break. In case the type declaration or the semantic of the parameter changes, it's good to let the code break. I guess that tools for static code analysis will be able to detect parameter name changes? Regards Thomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Keep type of reference params

2020-05-08 Thread Thomas Gutbier
be consistent if referenced parameters behaved in exactly the same way. Regards, Thomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal For Return-If / Early Return / Guard Clause Syntax

2020-05-10 Thread Thomas Lamy
Am 10.05.20 um 18:26 schrieb John Bafford: Hi Ralph, On May 10, 2020, at 11:49, Ralph Schindler wrote: Hi! # Intro I am proposing what is a near completely syntactical addition (only change is to language.y) to the language. The best terminology for this syntax is are: `return if`, "retur

Re: [PHP-DEV] About the use of the terms master/slave and blacklist, proposal to replace.

2020-06-15 Thread Thomas Nunninger
the list anonymously. (I'm not sure if we need to raise this questions in a broader context regarding other groups of people. I don't want to open a can of worms. But I don't want to forget about other groups.) Regards Thomas Am 15.06.20 um 17:43 schrieb Daniel Rodrigues

Re: [PHP-DEV] About the use of the terms master/slave and blacklist, proposal to replace.

2020-06-15 Thread Thomas Nunninger
asked for concrete examples where people where offended in the context of the PHP project to get an understanding of the issue. If there is no response perhaps we can assume there is no issue? (At least for people on the list? Perhaps for people working in the IT context?) Regards Thomas

Re: [PHP-DEV] Making the hardcoded string length limit of Throwable->getTraceAsString() configurable

2020-06-25 Thread Thomas Lamy
llowed to be 0 or more or 15 or more, defaulting to 15) () Thanks, - Tyson +1, wanted this for years but never got around to tackle it Thomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Draft RFC: foreach iteration of keys without values

2020-09-02 Thread Thomas Bley
Hello, I'd also like to propose to use null: [null, null, $username] = getUserData(); foreach ($source as $key => null) {} Regards Thomas > David Rodrigues hat am 02.09.2020 16:24 geschrieben: > > > I think "void" is a good solution and is very clear, com

[PHP-DEV] Suggestion: Make all PCRE functions return *character* offsets, rather than *byte* offsets if the modifier `u` (PCRE_UTF8) is given

2020-10-02 Thread Thomas Landauer
and just return byte offsets if the modifier `u` is given. * Or create *new* functions for it: `mb_preg_match_all()` etc. -- Cheers, Thomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] PHP 8 incompatible change documentation issues

2020-12-03 Thread Thomas Hruska
ristr() and strrchr() can now be empty." I fail to see how this change is useful/correct. In my experience, passing in an empty string for the needle to any of those functions has always been part of a more critical application bug. I'm also not sure why this is in the "Inc

Re: [PHP-DEV] Analysis of property visibility, immutability, and cloning proposals

2020-12-29 Thread Thomas Nunninger
, private read, init" write"? When will (a) be initialized? And if there is really a useful case for (a) why is there no "public read, private read"? Regards Thomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] is_literal

2021-06-14 Thread Thomas Nunninger
to think about that issue. But it's probably better than nothing. Perhaps someone has a better idea? Cheers Thomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-05-25 Thread Thomas Bley
var_dump($a->w); // Fatal error, uninitialized... Regards Thomas Fleshgrinder wrote on 25.05.2016 23:03: > On 5/25/2016 5:49 PM, Andrea Faulds wrote: >> PHP's existing untyped properties are implicitly initialised to null, >> and so yes, we would essentially only be copying

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-05-25 Thread Thomas Bley
// false var_dump(isset($a->u)); // false var_dump(isset($a->v)); // false var_dump(isset($a->w)); // false Regards Thomas >> public ?int $y = null; >> public int $z = 42; >> public ?int $u; >> public ?datetime $v; >> public datetime $w; >> } >&g

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-05-25 Thread Thomas Bley
Currently the rfc also checks the properties for being initialized. I think it's still faster than most userland implementations using __get() for type checks and parsing phpdoc for type information. Regards Thomas Stanislav Malyshev wrote on 25.05.2016 23:56: > Hi! > >&g

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-05-25 Thread Thomas Bley
st { private $z = 42; public function __construct() { unset($this->z); } } $a = new test(); $a->z = 21; // fatal: Cannot access private property... So after unset, $a->z should still have context. Regards Thomas Lester Caine wrote on 26.05.2016 00:13: &

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-05-25 Thread Thomas Bley
Of course isset() has a special behaviour. So having some kind of real_isset() or initialized() would be nice. Regards Thomas Thomas Bley wrote on 26.05.2016 00:38: >>> var_dump($a->z); // 0 + notice >> The notice should be 'variable does not exist' as at this poin

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-05-26 Thread Thomas Bley
var_dump(isset($a->w)); // false Regards Thomas Tom Worster wrote on 26.05.2016 15:53: > On 5/25/16 5:52 PM, Thomas Bley wrote: >> I'm not seeing a problem here: >> >> class A { >> public int $x; >> public ?int $y = null; >> public int $z = 42; >

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-05-26 Thread Thomas Bley
it's not so magic, rather think of (int)null, (float)null, (string)null, (array)null, etc. Typed properties could be defined as nullable by default, but I think that makes userland code much more ugly. Regards Thomas Tom Worster wrote on 26.05.2016 18:44: > Hi Thomas, > > On

Re: [PHP-DEV] [RFC Discussion] array_change_keys()

2016-05-29 Thread Thomas Nunninger
Hello, shouldn't it be possible to return null as new key? That way you say: Use the next free integer index. Not sure if returning null is wanted (as it could hide errors in the callback) or needed in some real world use cases. But it would be more in sync with $a[] = ... Regards T

Re: [PHP-DEV] Re: [RFC] [PRE-VOTE] Union types

2016-06-03 Thread Thomas Bley
); // string foo i(10.0); // int 10 i(10); // int 10 Regards Thomas Bob Weinand wrote on 02.06.2016 22:56: > >> Am 02.06.2016 um 22:25 schrieb Rowan Collins : >> >> On 02/06/2016 18:43, Bob Weinand wrote: >>> We had that exact idea relatively early, but it exposes ot

Re: [PHP-DEV] [RFC] [PRE-VOTE] Union types

2016-06-03 Thread Thomas Bley
maybe easier to get a majority from voters if defining union types only in strict mode for 7.1? Regards Thomas Rowan Collins wrote on 03.06.2016 15:40: > On 03/06/2016 13:30, Bob Weinand wrote: >> >> The *weak casting* rules (i.e. what gets converted how and what can be >

Re: [PHP-DEV] [RFC] [PRE-VOTE] Union types

2016-06-03 Thread Thomas Bley
tr_replace) since we can cast the string easily to array and calling a string parameter with an array would give a fatal error. Regards Thomas Rowan Collins wrote on 03.06.2016 16:32: > On 03/06/2016 15:24, Thomas Bley wrote: >> maybe easier to get a majority from voters if defining

Re: [PHP-DEV] [RFC] [PRE-VOTE] Union types

2016-06-03 Thread Thomas Bley
rray | int $matchCodes = null, string $matchMessage = null): bool Then it would be clear that we can't match an array of messages. But as said before string | int | ... makes no sense to me. Regards Thomas Jordi Boggiano wrote on 03.06.2016 17:16: > On 03/06/2016 15:58, Thomas Bley wrote: &g

Re: [PHP-DEV] [RFC] [PRE-VOTE] Union types

2016-06-05 Thread Thomas Bley
// int(42) test2('42'); // int(42) function test3(int|bool $a) {var_dump($a);} test3('foo'); // true Regards Thomas Bob Weinand wrote on 03.06.2016 14:30: > >> Am 3.6.2016 um 14:18 schrieb Rowan Collins : >> >> On 03/06/2016 12:59, Bob Weinand wrote: >>

Re: [PHP-DEV] [RFC][Vote] Typed Properties

2016-06-11 Thread Thomas Bley
l $enabled; public DateTime $created; } Regards Thomas Dmitry Stogov wrote on 10.06.2016 14:37: > Hi, > > > I hardly worked on implementation of this patch for a week, but I still don't > like it. > > It makes 15% slowdown on each property update in existing PHP code (wit

Re: [PHP-DEV] PHP allocating too much memory

2016-06-15 Thread Thomas Hruska
ure rates. Guess which solution I used? Fortunately, in my case, the number of queries being run was quite limited and on a set schedule. You might not be so lucky. -- Thomas Hruska CubicleSoft President I've got great, time saving software that you will find useful. http://cubiclesoft.com

Re: [PHP-DEV] New escaped output operator

2016-06-17 Thread Thomas Bley
using the default encoding from php.ini's default_charset should be no problem, htmlspecialchars() already does it if the encoding parameter is not provided. Regards Thomas Niklas Keller wrote on 17.06.2016 22:31: > Hi, > > the issue is that things have to be escaped dependent

Re: [PHP-DEV] New escaped output operator

2016-06-17 Thread Thomas Bley
you can simply add the context to the current output operator: (=strip_tags) Regards Thomas Stanislav Malyshev wrote on 17.06.2016 22:14: > Hi! > >> Most of output code is an output of properties of database entities, and >> only in some cases it's needed to conca

Re: [PHP-DEV] New escaped output operator

2016-06-17 Thread Thomas Bley
Walter, yes I read, did you read? Niklas wrote: > The escaping should also be aware of the content encoding. I wrote: no we have a php.ini setting The context problem is already answered in the mail from Stas. Regards Thomas Walter Parker wrote on 18.06.2016 00:20: > Thomas, a

Re: [PHP-DEV] New escaped output operator

2016-06-17 Thread Thomas Bley
Sure you can implement that in userland, but people don't do it or make it too complicated, so you get every day code with unescaped stuff. Regards Thomas Ryan Pallas wrote on 18.06.2016 00:27: > > > On Fri, Jun 17, 2016 at 2:23 PM, Thomas Bley <mailto:ma...@thomasbley.de

Re: [PHP-DEV] New escaped output operator

2016-06-19 Thread Thomas Bley
I think it's best to create a rfc and put it to vote: https://wiki.php.net/rfc/howto Having Guys, wait please) I don't suggest escaping package for all contexts and > for all cases. This is not what I described in my first letter. My point is > that the main job of echo operator "" is output an

Re: [PHP-DEV] New escaped output operator

2016-06-19 Thread Thomas Bley
you can never avoid people writing things incorrectly, just look at code using addslashes() instead of mysql_real_escape_string() ... Regards Thomas Walter Parker wrote on 20.06.2016 01:41: >> >> >> >> > where getting it 90% correct is worse that not doing anythi

Re: [PHP-DEV] New escaped output operator

2016-06-20 Thread Thomas Bley
to make it more clear: is a shortcut for: Using 2016-06-20 11:12 GMT+02:00 Lester Caine : > >> On 20/06/16 07:00, Niklas Keller wrote: >> >> Now ... I want to add content that includes >> >> > it needs to be in the format >> >> >