Re: [PHP-DEV] [RFC] Bug #72811 - Replacing parse_url()

2016-10-13 Thread David Walker
On Mon, Oct 10, 2016 at 1:22 PM Larry Garfield wrote: > Be aware that a user-space definition for a URL object already exists as > part of PSR-7: > > http://www.php-fig.org/psr/psr-7/#3-5-psr-http-message-uriinterface > > A core-provided mutable and incompatible object would be problematic. > > W

Re: [PHP-DEV] [RFC] Bug #72811 - Replacing parse_url()

2016-10-13 Thread David Walker
On Thu, Oct 13, 2016 at 10:54 AM Christoph M. Becker wrote: > On 07.10.2016 at 16:45, David Walker wrote: > > > On Fri, Oct 7, 2016 at 4:37 AM Nikita Popov > wrote: > > > >> Are you aware of the WHATWG URL standard [1]? Quoting the first goal > >> state

[PHP-DEV] Debugging with zero cost in production

2016-10-24 Thread David Rodrigues
sertSame(123, TestStack::pop()); How it should be a debug code, should be important that it not be generated and executed in production. Could I use assert() to do that, in all case? Then I could consider it as "already implemented". Bye! -- David Rodrigues -- PHP Internals - PHP Ru

[PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-10-26 Thread David Lundgren
maintained for classes that do not implement Iterator. [1] https://github.com/php/php-src/pull/2176 [2] https://bugs.php.net/bug.php?id=49369 Thanks, Dave -- David Lundgren dlundg...@syberisle.net 808.639.0365 GPG: 0x26F54D7F -- PHP Internals - PHP Runtime Development Mailing List To unsubscr

Re: [PHP-DEV] Re: Allow Iterator to be used with current, next, reset, key functions

2016-10-31 Thread David Lundgren
able in some other contexts. I'll also admit that I don't normally read the docs until I have problems. The behavior with passing objects to those functions is only documented by a user comment. Dave -- David Lundgren dlundg...@syberisle.net GPG: 0x26F54D7F -- PHP Internals - P

Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-10-31 Thread David Lundgren
now at index:1 current => 2 $ary->key(); // 1 // I'll bikeshed the Array type now $ary->search(2); // 1 $ary->in(2);// true $ary->keys();// [0,1,2] // threw these in here for good measure, part of \Iterator interface? $ary->first(); // 1 $ary->last();

Re: [PHP-DEV] Proposed RFC

2016-11-03 Thread David Rodrigues
mething in these ideas or anyway to improve > them. I should also note that I would need a volunteer to implement this as > my "C" skills are non-existent and I wouldn't have the confidence to delve > into the the PHP source. > > Thanks for your time. > > Best, > > Antony D'Andrea -- David Rodrigues -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposed RFC

2016-11-03 Thread David Rodrigues
; > Yes I have but I would like it to return ($n1/$n2) or whatever this input is, > without repeating it again. > > From: David Rodrigues [david.pro...@gmail.com] > Sent: 03 November 2016 15:48 > To: Antony D'Andrea > Cc: internals@lis

Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-11-03 Thread David Lundgren
of overhead. Again, thanks for the feedback! Dave On 10/26/16 8:42 AM, David Lundgren wrote: > Greetings, > > As suggested by several reviewers of a PR[1] I recently submitted, I'd > like to get feedback on letting custom Iterators be used in the current, > next, reset, and key

Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions

2016-11-03 Thread David Lundgren
e contexts: Yii CMarkdownParser: https://git.io/vXCiy ZF2 stdlib FastPriorityQueue: https://git.io/vXCiH Drupal DI Container: https://git.io/vXCPB Symfony MO file loader: https://git.io/vXCPK Symfony HttpFoundation Request: https://git.io/vXCXW Dave -- David Lundgren dlundg...@syberisle.net G

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-06 Thread David Rodrigues
I guess that the biggest problem is about the code parsing. Currently PHP should supports what you wrote, but with another meaning. And personally I think that this feature is not too common on programming language in general, once that it is possible from first format (maybe more clear too). Em 6

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-06 Thread David Walker
On Sun, Nov 6, 2016 at 1:59 PM David Rodrigues wrote: > I guess that the biggest problem is about the code parsing. Currently PHP > should supports what you wrote, but with another meaning. And personally I > think that this feature is not too common on programming language in > g

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-07 Thread David Walker
On Mon, Nov 7, 2016 at 1:38 PM Fleshgrinder wrote: > Hey guys! :) The first one should definitely be an error since it makes no sense. Sense be damed ;-) . I'd attribute it to an identity of sorts (if it was to go all out with comparison chaining). Yes it makes little sense, in practice, but

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-08 Thread David Walker
On Tue, Nov 8, 2016 at 12:34 PM Fleshgrinder wrote: > This requires associativity, as Python has it. > > https://docs.python.org/3/reference/expressions.html#comparisons > > The problem, as explained in the Python reference, is that in `x < y < > z` the variables `x` and `z` are never compared ag

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-11 Thread David Walker
On Wed, Nov 9, 2016 at 12:48 PM Fleshgrinder wrote: > On 11/8/2016 10:57 PM, David Walker wrote: > > I don't think that alone allows the chaining of comparisons. I'd have to > > look closer, but it'd seem to me that zend_ast_create_binary_op > > (ZEND_AST_BI

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-12 Thread David Walker
On Sat, Nov 12, 2016 at 3:08 AM Lauri Kenttä wrote: > On 2016-11-11 19:03, David Walker wrote: > > > > I took a quick stab at implementing, and had something working for > > constant expressions, but handling something akin to: > > > > $a = 2; > > if (1 &

Re: [PHP-DEV] [RFC] Interval Comparison

2016-11-12 Thread David Walker
On Sat, Nov 12, 2016 at 9:47 AM Christoph M. Becker wrote: > On 12.11.2016 at 17:21, David Walker wrote: > > > Should > > $a = 1; > > var_dump(1 < $a++ < 3); > > > > (expanded into numbers) be evaluated as: > > 1 < 2 && 2 < 3 -

Re: [PHP-DEV] PHP 5.6.27 and 5.6.28 both fail tests with Fatal error in the same place

2016-11-12 Thread David Lundgren
enssl/tests/streams_crypto_method.phpt Good hunting, David -- David Lundgren dlundg...@syberisle.net GPG: 0x26F54D7F signature.asc Description: OpenPGP digital signature

Re: [PHP-DEV] Immutability RFC

2016-11-16 Thread David Rodrigues
ublic static function getType(Type $type) { if (!$type->shouldBeCache()) { // Code flexibility... return new self($type); } if (!array_key_exists($type->id, self::$cache) { self::$cache[$type->id] = new self($type); }

[PHP-DEV] Declare directive to change engine version basis

2016-11-18 Thread David Rodrigues
int engine_version () { return (int) engine_version_declaration; } cast type unset () { if (engine_version() >= 70201) { fatal(cast doesn't supported); } notice(deprecated); return null; } -- David Rodrigues -- PHP Interna

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint, now with added variance

2016-11-23 Thread David Rodrigues
on factory() : static { > return parent::factory(); > > } > } > > >> >> cheers >> Dan >> Ack >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- David Rodrigues -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 7.1.0 GA

2016-11-23 Thread David Zuelke
> > Cheers > Joe Good stuff. A++, would use again :) Does it make sense to delay 7.1.1 by a week so its release cycle syncs up with that of 5.6 and 7.0? They're due on January 5, while 7.1.1 would be due Dec 28 right now. David -- PHP Internals - PHP Runtime Development Mai

Re: [PHP-DEV] Re: number_format() = "-0.00"

2016-11-25 Thread David Rodrigues
o fix a bug ( >> https://bugs.php.net/bug.php?id=73581). >> > It sounds like opinions are divided on this, I'll draft an RFC including > the other instances Christoph mentioned -- David Rodrigues -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [Concept] Magic Casting

2016-12-02 Thread David Rodrigues
le. Sure, but how the engine will knows when it should __cast()? For instance, when method(Type $variable) will call Type::__cast() for $variable, or just work with the Type instance? In this case, is not better I create an interface (like IsCollection) and call $variable->getCollectio

Re: [PHP-DEV] Re: [Concept] Magic Casting

2016-12-02 Thread David Rodrigues
var_dump() should uses __toString() here, not? 2016-12-02 11:44 GMT-02:00 Alex Bowers : > And because the email formatting appears bad (at least in externals.io) > > Here it is in a gist: > https://gist.github.com/alexbowers/9520c8df746249ecae2d9c7aad2e54ae -- David Rodrig

[PHP-DEV] Enumerated Types

2016-12-05 Thread David Rodrigues
o be voted, now? (Off-topic: there are some place where I can found the internals talking about that? The externals.io not allows search.) -- David Rodrigues -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bumping minimal OpenSSL version to 1.0.1 in master for PHP 7.1

2016-12-13 Thread David Zuelke
es, or vendor in a newer version, even though their system libssl is still receiving security updates. David -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.6 end of active support

2016-12-14 Thread David Zuelke
t. Perhaps the gcc compiler is an absolute > requirement and if that is true then the code isn't acceptable to any > other compiler regardless if it is C99 compliant or otherwise. It appears to be, from looking at https://bugs.php.net/bug.php?id=67229, but that affects PHP 5 as well, not just 7. David -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Bug 63744 - references in list()

2016-12-29 Thread David Walker
On 12/28/16 6:32 PM, Andrea Faulds wrote: Hi Dave, David Walker wrote: I stumbled upon this bug report (read: feature request) today and took a swing at it thinking it couldn't be that overly complex. But then again it was requested way back in the PHP4 era, so I figured there has to be

[PHP-DEV] [RFC][Discussion] - list() reference syntax

2016-12-30 Thread David Walker
Hi All, I had mentioned the other day my desire to look at, and attempt implementation of allowing by-reference assignment within list()'s. Andrea had created an RFC for this purpose 2+years ago, but withdrew it due to problems with implementation with the parsing/compiler of PHP 5. I've taken a

[PHP-DEV] Schedule for next releases?

2017-01-04 Thread David Zuelke
't been the usual RC tags for the new ones two weeks ago. Will this interval be skipped entirely, or does the schedule just shift? And will there be one last 5.6 release with outstanding bug fixes? Cheers! David -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

[PHP-DEV] [RFC][Post-Discussion]: E_WARNING when using array-index on non valid container

2017-01-11 Thread David Walker
[Sorry if this is a second time you get this, but email issues and all] Hi all, Joe had requested renewed discussion on the accepted RFC[1] and my proposed PR[2] be brought forward again for implementation discussion, and to come up with a resolution. The RFC, though accepted, had concerns with

[PHP-DEV] Fwd: [RFC][Discussion] - list() reference syntax

2017-01-11 Thread David Walker
[Sorry if this is a second time you get this, but email issues and all] Hi All, I had mentioned the other day my desire to look at, and attempt implementation of allowing by-reference assignment within list()'s. Andrea had created an RFC for this purpose 2+years ago, but withdrew it due to probl

Re: [PHP-DEV] Re: [RFC][Discussion] - list() reference syntax

2017-01-11 Thread David Walker
On Wed, Jan 11, 2017 at 3:15 PM Andrea Faulds wrote: > Regarding the =& open issue in the RFC, I don't think the =& syntax > makes sense to me. The thing on the right-hand side of a list() > assignment is the array, not its values. It makes no difference for the > purposes of assigning from its v

[PHP-DEV] Fixing Apache mod_proxy_fcgi SCRIPT_FILENAME et al for good

2017-01-17 Thread David Zuelke
nd FCGI SAPI's detection logic, and that needs coordinating :) What's the right place for this discussion? Would somebody with the right karma/experience be willing to sign up to https://httpd.apache.org/lists.html#http-dev and join in? Or does a GitHub issue or PR suffice? David

Re: [PHP-DEV] Fixing Apache mod_proxy_fcgi SCRIPT_FILENAME et al for good

2017-01-17 Thread David Zuelke
> On 17.01.2017, at 15:58, Remi Collet wrote: > > Le 17/01/2017 à 15:44, David Zuelke a écrit : >> Hi all, >> >> https://github.com/php/php-src/pull/694 and >> https://github.com/php/php-src/pull/765 brought support for Apache's >> "

Re: [PHP-DEV] bugsnet cleanup

2017-01-17 Thread David Lundgren
an help to make the tracker a little more visible? Dave -- David Lundgren dlundg...@syberisle.net GPG: 0x26F54D7F signature.asc Description: OpenPGP digital signature

[PHP-DEV] Re: [RFC][Discussion] - list() reference syntax

2017-01-30 Thread David Walker
On Wed, Jan 11, 2017 at 8:43 AM David Walker wrote: > [Sorry if this is a second time you get this, but email issues and all] > > Hi All, > > I had mentioned the other day my desire to look at, and attempt > implementation of allowing by-reference assignment within list(

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-01-30 Thread David Walker
On Mon, Jan 30, 2017 at 18:12 Andrea Faulds wrote: > Hi Levi, > > Levi Morrison wrote: > > Here is an example of an existing closure: > > > > function ($x) use ($arr) { > > return $arr[$x]; > > } > > > > This RFC proposes syntax and semantics to simplify this common usage to: > >

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-01-31 Thread David Rodrigues
gt; >> Thanks, > >> Bob > >> > > > > I must agree with Bob and the other authors. The entire point of this > RFC > > is to reduce the amount of typing, and therefore reading, that goes into > > using simple closures as first-class values. Using longer keywords > instead > > of shorter ones is counter to that aim. It sounds like the earlier > > proposal of keyword-less closures isn't technically feasible or it would > > make sense to argue for that. > > > > My question is why there's no mention of HHVM short closures, or the > > previous RFC to take that approach. See: > > > > https://docs.hhvm.com/hack/lambdas/introduction > > > > > > > > For what it's worth I'd rather look at > > array_map( $x ==> $x + 1); > > than > > array_map( fn($x) => $x + 1 ) > > Not to mention the former isn't a bc break. > -- David Rodrigues

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread David Rodrigues
> > > > > What about: > > > > > > |params| => expr > > > > Looks great to me from up here in the peanut gallery. > -- David Rodrigues

[PHP-DEV] [RFC][VOTE] - list() reference assignment

2017-02-06 Thread David Walker
Hi all, Having seen no further discussion I'd like to open the RFC[1] for voting. Voting will be given just over 2 weeks ending Feb 22nd. RFC has implementation[2] and language spec change[3] for review. Thanks! -- Dave [1] - https://wiki.php.net/rfc/list_reference_assignment [2] - https://git

Re: [PHP-DEV] [RFC][Vote] Libsodium vote closes; accepted (37-0)

2017-02-14 Thread David Zuelke
Will there be a renaming of the "libsodium" extension on PECL to "sodium" as well, and will the two codebases be kept in sync? Otherwise, libraries cannot, using Composer, express a dependency on "ext-sodium". > On 10.02.2017, at 22:04, Scott Arciszewski wrote: > > The vote for the Libsodium

[PHP-DEV] Re: [RFC][VOTE] - list() reference assignment

2017-02-22 Thread David Walker
On Mon, Feb 6, 2017 at 10:54 AM David Walker wrote: > Hi all, > > Having seen no further discussion I'd like to open the RFC[1] for voting. > Voting will be given just over 2 weeks ending Feb 22nd. RFC has > implementation[2] and language spec change[3] for review. >

Re: [PHP-DEV] generating code from AST

2017-03-06 Thread David Walker
On Mon, Mar 6, 2017 at 22:55 Sebastian Bergmann wrote: > Am 06.03.2017 um 22:40 schrieb Sara Golemon: > > https://github.com/sgolemon/astkit > > There's also https://github.com/nikic/php-ast. > > But wouldn't it be great if PHP 7.2 shipped with a built-in, > enabled-by-default extension for AST o

[PHP-DEV] OPcache compilation performance regression in PHP 5.6/7 with huge classes

2017-03-14 Thread David Zuelke
ache.enable_cli=1 -dopcache.optimization_level=0x7FEF hugeclass.php real 3.29 user 3.24 sys 0.04 In all versions, subsequent loads from the cache (such as when running FPM or the built-in web server) are fast. Is this slowness with a cold cache expected/accepted, or does that qualify as

Re: [PHP-DEV] OPcache compilation performance regression in PHP 5.6/7 with huge classes

2017-03-15 Thread David Zuelke
On 14 Mar 2017, at 16:39, Nikita Popov wrote: > > On Tue, Mar 14, 2017 at 11:29 AM, David Zuelke wrote: >> Hi all, >> >> There appears to be a performance regression in the CFG and DFA based >> optimization passes of OPcache in PHP 5.6+ when loading huge classe

Re: [PHP-DEV] Unexpected results from constant folding

2017-03-15 Thread David Rodrigues
C because that's the semantic meaning of self:: and we should > > respect PHP's own language rules. > > Barring that, I'd be okay with B as it's at least explainable without > > too much mental gymnastics. > > I straight up veto A. That's just cray-cray. > > > > Yes, this should behave as C. See also https://bugs.php.net/bug.php? > id=69676 > for an existing bug report on the topic. > > I think in 7.1 it might be even fairly simple so fix this: IIRC we now > store the defining CE on inherited constants, so we should know the scope > to resolve against. > > Nikita > -- David Rodrigues

Re: [PHP-DEV] Let range() return a generator?

2017-03-17 Thread David Rodrigues
ray? And > if > > so, would this constitute a break in backward compatibility? > > > Yes, that's a BC break. Instead of changing it, there could be a new > function. But as it can be simply built in userland, I don't see much > reason to have it in core. > > Regards, Niklas > -- David Rodrigues

Re: [PHP-DEV] Let range() return a generator?

2017-03-17 Thread David Rodrigues
gt; https://packagist.org/packages/phplang/generator > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- David Rodrigues

Re: [PHP-DEV] Let range() return a generator?

2017-03-17 Thread David Rodrigues
rn like an array. } In this case, when you call range() inside a Generator() constructor, then the range() (in C++) will acts differently, like a xrange(). 2017-03-17 22:57 GMT-03:00 Sara Golemon : > On Fri, Mar 17, 2017 at 8:40 PM, David Rodrigues > wrote: > > There are some

Re: [PHP-DEV] Re: TOKEN_AS_OBJECT for token_get_all()

2017-03-24 Thread David Rodrigues
Em 24 de mar de 2017 12:24 PM, "Andrea Faulds" escreveu: Hi Nikita, Nikita Popov wrote: I'd like to add a new TOKEN_AS_OBJECT flag to token_get_all(), which > returns an array of PhpToken objects, rather than the mix of plain strings > and arrays we currently have. The PhpToken class is define

[PHP-DEV] RFC: operating system specific features

2017-03-27 Thread David CARLIER
Hi, I wanted first to know if php source code can welcome oses specific features or should it remain as separated php modules ? For instance awhile ago I implemented a wrapper around OpenBSD's pledge for suhosin (php 5.x series) here https://github.com/sektioneins/suhosin/blob/master/pledge.c T

Re: [PHP-DEV] OPcache compilation performance regression in PHP 5.6/7 with huge classes

2017-03-27 Thread David Zuelke
Just another poke to surface it, in case this should be merged into the 7.0 branch as well :) https://bugs.php.net/bug.php?id=74250 > On 19. Mar 2017, at 23:39, David Zuelke wrote: > > Thanks for the fixes, Nikita! > > Will they be merged to the PHP-7.0 branch as well? >

Re: [PHP-DEV] OPcache compilation performance regression in PHP 5.6/7 with huge classes

2017-03-28 Thread David Zuelke
Thanks; NEWS entry is missing though! And it unfortunately *just* missed the 7.0.18 branch cutoff :( Or can it be merged to PHP-7.0.18, given how problems would be caught in 7.1.4RC1 testing? ;) > On 28. Mar 2017, at 22:10, Nikita Popov wrote: > > On Mon, Mar 27, 2017 at 10:58

[PHP-DEV] Throw an exception for possible file race condition

2017-04-05 Thread David Rodrigues
Exception $exception) { throw new SomeException(); } It will avoid the @-operator and make the result more reliable (for instance, if you don't uses the @-operator in this case and is catched by a race condition). -- David Rodrigues

Re: [PHP-DEV] PHP 7.1.4 is available

2017-04-13 Thread David Zuelke
The changelog is incomplete; stops at iconv. https://github.com/php/php-src/commit/330a7b62c3558aa987ee80e12f1914347d3a9eee is also missing from NEWS for 7.1.3 > On 13. Apr 2017, at 18:43, Joe Watkins wrote: > > Evening, > > The PHP development team announces the immediate availability of PH

Re: [PHP-DEV] Type casting syntax

2021-07-11 Thread David Rodrigues
but the idea didn't go forward (even though there were no alternatives). :( Atenciosamente, David Rodrigues Em sáb., 10 de jul. de 2021 às 06:10, Max Semenik escreveu: > I've been thinking about extending PHP's cast syntax to user-defined types, > e.g. not only (int)$f

[PHP-DEV] array_merge() inside looping optimization

2021-07-25 Thread David Rodrigues
erate another one. Anyway, I don't know if this is actually possible, or if the cost-benefit would be better than what there is today. But I believe it is a path to be thought of. Atenciosamente, David Rodrigues

[PHP-DEV] New operator suggestion

2021-09-04 Thread David Kolář
HP? Is it worth to create an RFC for this? I never did an RFC yet and has not much experience with C++, since I am mostly Delphi/PHP/JS developer, but I might try. Still, I would appreciate a help from someone willing and experienced in RFC creation. Thank you in advance for your opinions, Dav

[PHP-DEV] Class static initialization block

2021-09-11 Thread David Rodrigues
Hello! I would like to suggest a feature I saw being implemented in the V8 9.4 engine called "*class static initialization block*". https://v8.dev/blog/v8-release-94 In short, it is a method that is executed once when a class is imported and loaded, allowing for some more advanced initialization

Re: [PHP-DEV] RFC Concept: "Import" of simplied string manipulation and other instructions from ASP Classic

2021-09-25 Thread David Rodrigues
weeks using date() -- I had to search. But I think creating new "root functions" would be too much. Perhaps a package like Carbon could be very useful. Or even the DateTime itself. Atenciosamente, David Rodrigues Em sáb., 25 de set. de 2021 às 16:48, Daniele B via internals < intern

Re: [PHP-DEV] [RFC] Allow null as standalone type

2021-10-05 Thread David Gebler
On Tue, Oct 5, 2021 at 3:45 PM Nikita Popov wrote: > On Tue, Oct 5, 2021 at 4:08 PM Côme Chilliet wrote: > > > Le lundi 4 octobre 2021, 10:09:12 CEST Nikita Popov a écrit : > > > If we make this change, I would however suggest to also support "false" > > as > > > a standalone type. I think this

Re: [PHP-DEV] header() allows arbitrary status codes

2021-12-22 Thread David Gebler
On Tue, Dec 21, 2021 at 6:59 PM Christoph M. Becker wrote: > Hi all, > > a while ago it has been reported[1] that our header() function actually > allows arbitrary status codes, which may even overflow. Of course, that > makes no sense, since the status code is supposed to be a three digit > cod

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-03 Thread David Gebler
On Mon, Jan 3, 2022 at 5:38 PM Nikita Popov wrote: > On Mon, Jan 3, 2022 at 1:14 AM Jordan LeDoux > wrote: > > > Hello internals, > > > > I've opened voting on > > https://wiki.php.net/rfc/user_defined_operator_overloads. The voting > will > > close on 2022-01-17. > > > > To review past discussi

Re: [PHP-DEV] RFC: Trait expects interface

2022-01-05 Thread David Gebler
#x27;s my two cents, good luck with whatever you're trying to do anyway. - David > -- > Kirill Nesmeyanov

Re: [PHP-DEV] RFC: Trait expects interface

2022-01-05 Thread David Gebler
#x27;, $message); } } in the manner of Java...no idea how easy or not it would be for someone a little more experienced than me working on PHP core to do this though. - David > --Larry Garfield > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > >

Re: [PHP-DEV] [RFC] [VOTE] Allow null and false as stand-alone types

2022-03-12 Thread David Rodrigues
Maybe I'm a little late to this discussion, but is there any reason why *false|null* is allowed but *true|null* is not? I can think of few cases where *true|null* could be interesting, but I've been through situations like this. Atenciosamente, David Rodrigues Em sáb., 12 de mar.

Re: [PHP-DEV] [RFC] Undefined Property Error Promotion

2022-04-15 Thread David Rodrigues
> $foo[?'maynotexist'] // returns null and emits no warning In JS we have some like: foo['maynotexist'] foo?.['maynotexist'] In PHP could be: $foo['maynotexist'] $foo?->['maynotexist'] Atenciosamente, David Rodrigues Em sex., 15 de ab

[PHP-DEV] Early feedback on encrypted session PR

2022-05-17 Thread David CARLIER
Hi, I wanted a more general but early feedback on the idea itself https://github.com/php/php-src/pull/3759 which is encrypting/decrypting the session on the fly with openssl (assuming as an improvement it would need a more complex key than the session id to make it more useful and being configura

Re: [PHP-DEV] Early feedback on encrypted session PR

2022-05-18 Thread David CARLIER
Thanks all for the early feedback. So it is an attempt to mitigate tampering attacks basically on session stored on filesystems. So it appears to be a subset of session usage overall indeed but doing so in a native manner is what drove the PR. On Wed, 18 May 2022 at 18:43, Christoph M. Becker wr

[PHP-DEV] VCS Account Request: devnexen

2022-06-02 Thread David Carlier
phpdoc php-src -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Adding new closing tag =?> for keeping trailing newline

2022-06-05 Thread David Gebler
On Sun, Jun 5, 2022 at 9:24 AM shinji igarashi wrote: > Hello everyone, > > I'd like to propose adding a new closing tag `=?>` to the language. > > PHP currently removes the newline character immediately following > the closing tag `?>`. > Personal opinion, seems like a classic sledgehammer on a

Re: [PHP-DEV] RFC Idea - is_json - looking for feedback

2022-07-29 Thread David Rodrigues
ntion. The performance would also be absurdly better. What worries me above is the misuse of the function, like checking if is_json() === true and using json_decode() right after. However, I believe this can be easily optimized by the engine itself. My vote is YES. Atenciosamente, David Rodrigues

Re: [PHP-DEV] RFC Idea - is_json - looking for feedback

2022-07-30 Thread David Gebler
On Sat, Jul 30, 2022 at 3:01 PM Nikita Popov wrote: > On Fri, Jul 29, 2022 at 4:27 PM juan carlos morales < > dev.juan.mora...@gmail.com> wrote: > > > I am following the RFC guideline for the first time. ( > > https://wiki.php.net/rfc/howto) > > > > As suggested there, I am here to get a feeling

[PHP-DEV] array_merge() vs array unpacking performance

2022-08-01 Thread David Rodrigues
Hello! PHP 8.1 supports array unpacking with keys. I guess that is very similar to array_merge(), but for some reason array_merge() is 50% slower than unpacking. So my question is: is there some way to optimize the engine so array_merge() can work like unpacking? Thanks!

Re: [PHP-DEV] RFC Idea - is_json - looking for feedback

2022-08-01 Thread David Gebler
On Sun, Jul 31, 2022 at 4:41 PM Larry Garfield wrote: > So the core argument, it seems, is "there's lots of user-space > implementations already, hence demand, and it would be > better/faster/stronger/we-have-the-technology to do it in C." > There's innumerable features implemented in userland w

Re: [PHP-DEV] array_merge() vs array unpacking performance

2022-08-01 Thread David Rodrigues
han array unpacking. Atenciosamente, David Rodrigues Em seg., 1 de ago. de 2022 às 14:45, Kamil Tekiela escreveu: > Hi David, > > It would be useful if you could provide your measurements and the way you > arrived at such results. A quick test doesn't seem to support your > fin

Re: [PHP-DEV] Proposal for floored division and modulo functions

2022-08-22 Thread David Gebler
On Mon, Aug 22, 2022 at 4:22 AM Daniel Wolfe wrote: > For the first four instances, the function works as intended since the > timestamps are non-negative numbers. However, for the fifth example, > since the date is before 1970, the timestamp is going to be negative > resulting in an ostensible a

Re: [PHP-DEV] Proposal for floored division and modulo functions

2022-08-23 Thread David Gebler
On Tue, Aug 23, 2022 at 6:27 PM Daniel Wolfe wrote: > > If we do go down the operator route, however, what tokens should be > chosen? `%%` makes since for floor modulo, but `//` is already used for > comments. > Yeah I appreciate it is tricky, because // is pretty much the only obviously sensibl

Re: [PHP-DEV] RFC json_validate() - status: Under Discussion

2022-08-25 Thread David Gebler
I'm not a voter on RFCs so my input may be largely irrelevant here but for discussion purposes: I remain unconvinced regarding the justification for this proposal. I'm not saying there's a strong reason to NOT implement it, but I'm not convinced it's really going to be a significant benefit to man

Re: [PHP-DEV] RFC json_validate() - status: Under Discussion

2022-08-25 Thread David Gebler
Having actually compiled the branch and tried it out, I have to say regardless of whether validating arbitrarily large blocks of JSON without being interested in the contents is a common or more niche use case, the memory savings ARE highly impressive. I had thought that because the function was bu

Re: [PHP-DEV] RFC json_validate() - status: Under Discussion

2022-08-26 Thread David Gebler
On Fri, Aug 26, 2022 at 6:29 PM Kamil Tekiela wrote: > What is the reasoning behind the name? I can't find it explained in the > RFC. What about other alternatives like is_json or validate_json? > The name json_validate makes most sense to me; it groups itself together nicely with the other json

Re: [PHP-DEV] RFC json_validate() - status: Under Discussion

2022-08-26 Thread David Gebler
Juan, You can always offer two votes on the RFC - one for the function itself, then one for should it return boolean or return an int representing the json_last_error constants and let it be decided that way. I think on the whole, I agree with the sentiment that returning boolean and checking json

Re: [PHP-DEV] Re: Increase maximum size of an uploaded file to 50Mbyte

2022-09-07 Thread David Gebler
On Wed, Sep 7, 2022 at 10:47 PM Kris Craig wrote: > On Wed, Sep 7, 2022 at 11:38 AM juan carlos morales < > dev.juan.mora...@gmail.com> wrote: > > > I looked for a potential problem out of doing such a change but I could > not > > find anything. > > > > Then I'd say it's a no-brainer. The curren

Re: [PHP-DEV] Increase maximum size of an uploaded file to 50Mbyte

2022-09-10 Thread David Gebler
On Sat, Sep 10, 2022 at 3:05 PM juan carlos morales < dev.juan.mora...@gmail.com> wrote: > I also agree that increasing the size to something bigger than 8M > might not be a good idea; I can imagine that a value bigger than 8M > (like 50M) will cause an impact in hosting platforms specially, which

Re: [PHP-DEV] Sanitize filters

2022-10-02 Thread David Gebler
On Sun, Oct 2, 2022 at 4:10 PM Larry Garfield wrote: > The filter extension has always been a stillborn mess. Its API is an > absolute disaster and, as you note, its functionality is unclear at best, > misleading at worst. Frankly it's worse than SPL. > > I'd be entirely on board with jettisoni

Re: [PHP-DEV] Sanitize filters

2022-10-03 Thread David Gebler
On Mon, Oct 3, 2022 at 11:29 AM Max Semenik wrote: > > Is there a compelling need to have this in the core, as opposed to > Composer packages? The ecosystem has changed a lot since the original > function was introduced. > I don't know that there is, I suspect the answer is probably not and sani

[PHP-DEV] Experimental features

2022-10-04 Thread David Rodrigues
before the next version is released, allowing users to try them out more easily. Atenciosamente, David Rodrigues

Re: [PHP-DEV] Experimental features

2022-10-04 Thread David Rodrigues
are available natively and enabled by default, it would be interesting, because it would be easier to separate the main code from the code in development/refinement (and that can be rejected at some point in a more practical way, and maybe be kept as just an extension apart from PHP). Atencios

Re: [PHP-DEV] Experimental features

2022-10-05 Thread David Rodrigues
atures and shouldn't be used in production (unless you're willing to take risks). The difference between using the in-development version of PHP 8.2 is that many servers only make this version officially available after a few months, while smaller versions of PHP usually become available w

Re: [PHP-DEV] Sanitize filters

2022-10-05 Thread David Gebler
On Tue, Oct 4, 2022 at 11:34 AM Rowan Tommins wrote: > The "notorious" thing I know is that validating e-mail addresses is next > to impossible because of multiple overlapping standards, and a huge > number of esoteric variations that might or might not actually be > deliverable in practice. If y

Re: [PHP-DEV] Experimental features

2022-10-06 Thread David Rodrigues
earlier feedback from users willing to test it. Atenciosamente, David Rodrigues Em qui., 6 de out. de 2022 às 17:12, Rowan Tommins escreveu: > On 06/10/2022 17:41, Alex Wells wrote: > > For example, Kotlin has recently introduced a new feature - unsigned > integer types. > > &g

Re: [PHP-DEV] Experimental features

2022-10-10 Thread David Gebler
My two cents... Why can't "common users" install a PECL extension? It's not a difficult, obscure or undocumented process. I can accept the reasoning > Apply a PECL strategy to try experimental features might not be the convenient way always, for example, if we create a new ... sensitive ini sett

Re: [PHP-DEV] Experimental features

2022-10-10 Thread David Rodrigues
use experimental_json_validate(), else use previous PHP compatible code. Atenciosamente, David Rodrigues Em seg., 10 de out. de 2022 às 19:20, David Gebler escreveu: > My two cents... > > Why can't "common users" install a PECL extension? It's not a difficult, &

Re: [PHP-DEV] Experimental features

2022-10-10 Thread David Gebler
On Tue, Oct 11, 2022 at 12:05 AM David Rodrigues wrote: > The idea is that the experimental features are exclusively something that > the PHP team has voted for (approved) and that will be part of the language. > So they're not experimental features, they're accepted RFCs,

[PHP-DEV] Feature preview (formely was: experimental features)

2022-10-11 Thread David Rodrigues
eatures should generally be released in patch versions (eg. PHP 8.1.12 to preview a PHP 8.2 feature). Atenciosamente, David Rodrigues

Re: [PHP-DEV] Feature preview (formely was: experimental features)

2022-10-11 Thread David Rodrigues
taxes to co-exist in this feature is acceptable (which I personally think is a bad idea). Atenciosamente, David Rodrigues Em ter., 11 de out. de 2022 às 22:23, Larry Garfield escreveu: > On Tue, Oct 11, 2022, at 3:25 PM, David Rodrigues wrote: > > In order to try to organize a litt

Re: [PHP-DEV] Feature preview (formely was: experimental features)

2022-10-11 Thread David Rodrigues
>From what I understand, your concern is "what if we need to change the direction of something already decided"? For example, initially it was decided and very well accepted private(set), but after a while the idea was revised and it was decided that private:set would be better instead. In this ca

Re: [PHP-DEV] [RFC] Destructuring Coalesce

2022-10-16 Thread David Rodrigues
#x27;123' [ $a ?: '123' ] = [ 456 ]; so $a = 456 Atenciosamente, David Rodrigues

<    6   7   8   9   10   11   12   13   14   15   >