Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-06 Thread Ryan Pallas
On Tue, Feb 6, 2018 at 8:24 AM, Larry Garfield wrote: > > > That said, I'm not sure that function autoloading will be that big of a > carrot > for the major projects at this point. Wordpress is going to ignore > anything > we do here anyway for at least 15 years, and

Re: [PHP-DEV][RFC][DISCUSSION] Collection Inspection

2018-01-25 Thread Ryan Pallas
On Thu, Jan 25, 2018 at 9:21 AM, Derick Rethans <der...@php.net> wrote: > On Thu, 25 Jan 2018, Ryan Pallas wrote: > > > On Thu, Jan 25, 2018 at 7:52 AM, Derick Rethans <der...@php.net> wrote: > > > > > On Wed, 24 Jan 2018, Michael Morris wrote: > >

Re: [PHP-DEV][RFC][DISCUSSION] Collection Inspection

2018-01-25 Thread Ryan Pallas
On Thu, Jan 25, 2018 at 7:52 AM, Derick Rethans wrote: > On Wed, 24 Jan 2018, Michael Morris wrote: > > > Ok, here's another idea I've been mulling over. This I know is possible > > because I've done it using user land code, specifically Drupal 8's > > Assertion\Inspector class.

Re: [PHP-DEV] [RFC] Flexible Heredoc and Nowdoc Syntaxes

2017-10-13 Thread Ryan Pallas
On Fri, Oct 13, 2017 at 3:40 AM, Thomas Punt wrote: > Morning internals, > > > I'd like to propose an RFC to make the heredoc and nowdoc syntaxes more > flexible[1]. Any thoughts? > I really like this, and I don't think it's that hard to not use the marker in the body at

Re: [PHP-DEV] [RFC] Deprecate the extract function in PHP 7.3

2017-09-15 Thread Ryan Pallas
On Fri, Sep 15, 2017 at 11:50 AM, Sara Golemon wrote: > On Fri, Sep 15, 2017 at 1:35 PM, wrote: > > The `extract` function takes an associative array and > > puts it into the local symbol table. > > http://php.net/manual/en/function.extract.php > > > > I

Re: [PHP-DEV] [RFC] Deprecate the extract function in PHP 7.3

2017-09-15 Thread Ryan Pallas
stly, I don't know (ps 2 lines without braces instead of 3!) > > Regards > > > On 15 Sep 2017, 19:30 +0200, Ryan Pallas <derokor...@gmail.com>, wrote: > > > > On Sep 15, 2017 11:22 AM, <ilija.tov...@me.com> wrote: > > Hi! > > The `extract` func

Re: [PHP-DEV] [RFC] Deprecate the extract function in PHP 7.3

2017-09-15 Thread Ryan Pallas
On Sep 15, 2017 11:22 AM, wrote: Hi! The `extract` function takes an associative array and puts it into the local symbol table. http://php.net/manual/en/function.extract.php ``` $array = [ ‘foo’ => ‘foo’, ‘bar’ => ‘bar’, ]; extract($array); print $foo; // "foo"

Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-13 Thread Ryan Pallas
On Wed, Sep 13, 2017 at 8:06 AM, Rowan Collins <rowan.coll...@gmail.com> wrote: > On 13 September 2017 14:15:43 BST, Ryan Pallas <derokor...@gmail.com> > wrote: > >I must be missing something, there is no autoloader shipped with PHP. > > Just to be pedant

Re: [PHP-DEV] Deprecate and remove case-insensitive constants?

2017-09-13 Thread Ryan Pallas
On Wed, Sep 13, 2017 at 2:59 AM, Tony Marston wrote: > >> > You seem to forget that autoloading is an option, not a requirement. I > don't use autoloading in my 14 year old framework for several reasons: > - An autoloader did not exist when I created my framework. > - I

Re: [PHP-DEV] [RFC] Match expression

2017-09-10 Thread Ryan Pallas
On Sep 10, 2017 1:23 PM, "li...@rhsoft.net" wrote: Am 10.09.2017 um 21:16 schrieb Theodore Brown: > On Sunday, September 10, 2017 12:45 PM Rowan Collins < > rowan.coll...@gmail.com> wrote: > > Would it be possible to add an optional `$strict` parameter to switch? E.g.

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

2017-06-05 Thread Ryan Pallas
On Mon, Jun 5, 2017 at 1:09 PM, Fleshgrinder <p...@fleshgrinder.com> wrote: > On 6/5/2017 9:03 PM, Ryan Pallas wrote: > > However, ($obj) -> $var is valid variable property syntax. > > > > Gosh, we really have support for everything. :D That one is even very > imp

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

2017-06-05 Thread Ryan Pallas
On Jun 5, 2017 12:53 PM, "Fleshgrinder" wrote: On 6/5/2017 8:36 PM, Rasmus Schultz wrote: > Ugh, you're right, that's totally unreadable... the => is far too ambiguous > with array syntax, I agree. > > How about just a thin arrow? > > (params) -> expr > > If the parens

Re: [PHP-DEV] Parameter type widening RFC

2017-05-26 Thread Ryan Pallas
On Fri, May 26, 2017 at 9:01 AM, li...@rhsoft.net wrote: > > > Am 26.05.2017 um 16:26 schrieb Dan Ackroyd: > >> On 26 May 2017 at 13:23, li...@rhsoft.net wrote: >> >>> does that also fix the issue https://bugs.php.net/bug.php?id=74394 >>> >> >> >> Dear

Re: [PHP-DEV] messages not delivering?

2017-05-17 Thread Ryan Pallas
On Wed, May 17, 2017 at 8:25 AM, Adam Baratz wrote: > > > I'm think this problem might've cropped up again. I didn't receive this > > > message: > > > http://news.php.net/php.internals/99052 > > > > > > I only heard about it because it was mentioned in a PR thread. > > > > >

Re: [PHP-DEV] my concept ( new PDO FETCH MODE )

2017-05-10 Thread Ryan Pallas
Couldn't you just use return $stmt->fetch() ?: null; to return null instead of false? On Wed, May 10, 2017 at 9:51 AM, Csonka Titus wrote: > Greetings, > > I want to propose a new PDO FETCH MODE. > > Whenever I fetch(http://php.net/manual/en/pdostatement.fetch.php) a >

Re: [PHP-DEV] [RFC][VOTE] Improve hash_hkdf() parameter

2017-05-09 Thread Ryan Pallas
On May 9, 2017 15:46, "Yasuo Ohgaki" wrote: Hi Andrey, On Sun, Apr 30, 2017 at 8:26 AM, Yasuo Ohgaki wrote: > On Sun, Apr 30, 2017 at 8:14 AM, Yasuo Ohgaki wrote: > >> I don't need your view of HKDF RFC or usage, but I do need good

Re: [PHP-DEV] Add is_vectorlike($array) function

2017-05-06 Thread Ryan Pallas
On Sat, May 6, 2017 at 9:42 AM, Rowan Collins <rowan.coll...@gmail.com> wrote: > On 5 May 2017 22:19:51 BST, Ryan Pallas <derokor...@gmail.com> wrote: > >I just read this thread and am wondering what exactly is the use case? > >Like > >are you going to do somet

Re: [PHP-DEV] Add is_vectorlike($array) function

2017-05-05 Thread Ryan Pallas
On Tue, May 2, 2017 at 3:13 AM, Jesse Schalken wrote: > Related to the optimisation made by Sara Golemon here: > https://github.com/php/php-src/commit/c74bc87c74f48bc55541b3bf2fc67d > 595f58a3b5 > > I often define a function like this, which checks if an array is "vector

Re: [PHP-DEV] ; on the end of the line

2017-03-30 Thread Ryan Pallas
On Thu, Mar 30, 2017 at 12:19 PM, Johannes Schlüter wrote: > On Do, 2017-03-30 at 00:07 -0700, Davey Shafik wrote: > > Notice each of these has two statements. (Note: I don't think any of > > these > > are particularly good ways to write readable code, but they are all >

Re: [PHP-DEV] Directory separators on Windows

2017-03-30 Thread Ryan Pallas
On Thu, Mar 30, 2017 at 8:05 AM, Rowan Collins wrote: > On 30 March 2017 14:25:02 BST, Rasmus Schultz wrote: > > >Returning backslashes on Windows seems rather unnecessary in the first > >place, since forward slashes work just fine? > > This may be

Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array

2017-03-15 Thread Ryan Pallas
st misunderstand what constitutes an BC break. I thought a BC break was when identical code produced different results. But you're saying its a break because someone could change their code to use a new feature and break their use of your library? On 15 Mar 2017 11:57 p.m., "Ryan Pallas&q

Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array

2017-03-15 Thread Ryan Pallas
On 15 Mar 2017 11:36 p.m., "Ryan Pallas" <derokor...@gmail.com> wrote: > > > On Wed, Mar 15, 2017 at 4:33 PM, Marco Pivetta <ocram...@gmail.com> wrote: > >> It's the only way to distinguish between set and unset properties. Also >> the >> only wa

Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array

2017-03-15 Thread Ryan Pallas
On Wed, Mar 15, 2017 at 4:33 PM, Marco Pivetta wrote: > It's the only way to distinguish between set and unset properties. Also the > only way to get all properties from an instance of an inheritance tree. > Also, it's covered by tests that were explicitly added to prevent >

Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array

2017-03-15 Thread Ryan Pallas
On Wed, Mar 15, 2017 at 11:49 AM, Benoît Burnichon wrote: > Hi all, > > Looking at code of PHPUnit, I stumbled upon an inconsistent array > conversion: > > -- > /** > * @param ArrayAccess|array $other > */ > function evaluate($other) > { > // type cast $other as an

Re: [PHP-DEV] [Discussion] is_string(), string type and objects implementing __toString()

2017-03-08 Thread Ryan Pallas
On Wed, Mar 8, 2017 at 9:50 AM, Ryan Pallas <derokor...@gmail.com> wrote: > > > On Wed, Mar 8, 2017 at 8:51 AM, Fleshgrinder <p...@fleshgrinder.com> wrote: > >> Hey! :) >> >> The reference is actually not a problem for a Stringable because you >

Re: [PHP-DEV] [Discussion] is_string(), string type and objects implementing __toString()

2017-03-08 Thread Ryan Pallas
On Wed, Mar 8, 2017 at 8:51 AM, Fleshgrinder wrote: > Hey! :) > > The reference is actually not a problem for a Stringable because you > would get the "Only variables can be passed by reference" error with an > object if `strict_types` is enabled. > > Simply because the

Re: [PHP-DEV] [Discussion] is_string(), string type and objects implementing __toString()

2017-03-08 Thread Ryan Pallas
Sorry, accidently sent in the middle of typing that... On Wed, Mar 8, 2017 at 7:42 AM, Ryan Pallas <derokor...@gmail.com> wrote: > > > On Wed, Mar 8, 2017 at 5:25 AM, Andrey Andreev <n...@devilix.net> wrote: > >> Hi all, >> >> I submitted a GitHub PR

Re: [PHP-DEV] [Discussion] is_string(), string type and objects implementing __toString()

2017-03-08 Thread Ryan Pallas
On Wed, Mar 8, 2017 at 5:25 AM, Andrey Andreev wrote: > Hi all, > > I submitted a GitHub PR* to allow objects implementing __toString() to > *optionally* pass is_string() validation. More verbose wording of my > motivation can be seen in the PR description, but here are the

Re: [PHP-DEV] [RFC] Comparable

2017-01-31 Thread Ryan Pallas
On Tue, Jan 31, 2017 at 3:48 PM, Fleshgrinder wrote: > Hi :) > > I have a few questions regarding the comparable RFC: > > https://wiki.php.net/rfc/comparable > > Couldn't find the thread in my history and thus cannot respond directly > to any of the past threads. Maybe not

Re: [PHP-DEV] Pipe Operator v2

2017-01-19 Thread Ryan Pallas
On Thu, Jan 19, 2017 at 4:08 PM, Rowan Collins <rowan.coll...@gmail.com> wrote: > > > On 19/01/2017 22:17, Ryan Pallas wrote: > >> >> When you say assert the right hand side is callable, does that mean to >> call an object method, you would do [$obj

Re: [PHP-DEV] Pipe Operator v2

2017-01-19 Thread Ryan Pallas
On Thu, Jan 19, 2017 at 5:54 AM, Levi Morrison wrote: > On Wed, Jul 20, 2016 at 5:42 PM, Sara Golemon wrote: > > With the branching of 7.1, and after some reflection on the previous > > feedback, I'd like to reopen discussion of the Pipe Operator RFC > >

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

2016-12-14 Thread Ryan Pallas
On Wed, Dec 14, 2016 at 1:39 PM, Dennis Clarke wrote: > On 12/14/2016 03:31 PM, Marco Pivetta wrote: > >> See https://secure.php.net/supported-versions.php >> > > I see. > > I guess the question has to be "why is the 5.6.x codebase only to receive > security fixes for a

Re: [PHP-DEV] PHP 7.1.0 GA

2016-11-22 Thread Ryan Pallas
Great work everyone! Your users appreciate all you do! https://media.giphy.com/media/nEUsjV11iZCPS/giphy.gif On Tue, Nov 22, 2016 at 11:36 AM, Joe Watkins wrote: > Evening internals, > > I'm excited to announce that PHP 7.1.0 will be GA on December 1st. > > It has taken

Re: [PHP-DEV] Request for wiki account activation

2016-11-19 Thread Ryan Pallas
On Nov 19, 2016 9:16 AM, "Joe Watkins" wrote: > > Afternoon internals, > > Wes already registered for a wiki account, but "it doesn't work". > > Can someone fix it, please. > > @Wes we aren't paying for any walls. Don't worry, we'll make python pay for the wall. > >

Re: [PHP-DEV] Immutability RFC

2016-11-16 Thread Ryan Pallas
On Wed, Nov 16, 2016 at 6:57 AM, Silvio Marijić wrote: > Hi, > > To anyone who is interested in this RFC. What do you think what behavour we > should have when you try to compare two immutable objects by identity like > this: > > immutable class A { > > public $a; > >

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Ryan Pallas
On Tue, Oct 4, 2016 at 1:31 PM, Ryan Pallas <derokor...@gmail.com> wrote: > > > On Tue, Oct 4, 2016 at 8:33 AM, Pascal KISSIAN <php-mailing-l...@lool.fr> > wrote: > >> >-Message d'origine- >> >De : Lauri Kenttä [mailto:lauri.ken...@gmail.com]

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Ryan Pallas
On Tue, Oct 4, 2016 at 8:33 AM, Pascal KISSIAN wrote: > >-Message d'origine- > >De : Lauri Kenttä [mailto:lauri.ken...@gmail.com] > >Envoyé : mardi 4 octobre 2016 16:21 > >À : Pascal KISSIAN > >Cc : internals@lists.php.net > >Objet :

Re: [PHP-DEV] Fix ReflectionType::__toString() BC break

2016-09-21 Thread Ryan Pallas
On Wed, Sep 21, 2016 at 12:44 PM, Jakub Zelenka wrote: > Hi, > > On Wed, Sep 21, 2016 at 7:07 PM, Levi Morrison wrote: > >> On Wed, Sep 21, 2016 at 11:13 AM, Nicolas Grekas >> wrote: >> >> To handle this in code written around current

Re: [PHP-DEV] Fix ReflectionType::__toString() BC break

2016-09-21 Thread Ryan Pallas
On Wed, Sep 21, 2016 at 10:13 AM, Nicolas Grekas wrote: > > > > See https://github.com/php/php-src/pull/2136 > >> > > > > I don't like this. > > > > I understand, really. I do have to deal with BC on Symfony side also and > it's a really hard constraint. Yet, we stick

Re: [PHP-DEV] Fix ReflectionType::__toString() BC break

2016-09-21 Thread Ryan Pallas
On Wed, Sep 21, 2016 at 10:34 AM, Nicolas Grekas wrote: > > >> I'm not so sure its a BC though. Technically nullable types don't exist >> in 7.0 and as such would be impossible to return said question mark. Its >> only adding support for a new feature, not changing how

Re: [PHP-DEV] [RFC] Deprecate PEAR/PECL & Replace with composer/pickle

2016-09-02 Thread Ryan Pallas
On Fri, Sep 2, 2016 at 1:32 PM, Davey Shafik wrote: > Hi internals, > > I'd like to introduce a new RFC to deprecate pear/pecl (in 7.2, and remove > in 8.0), as well as add composer/pickle (optional in 7.2, default in 7.3+) > in their place. > >

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Argon2 Password Hash

2016-08-05 Thread Ryan Pallas
On Fri, Aug 5, 2016 at 8:49 AM, Charles R. Portwood II < charlesportwoo...@erianna.com> wrote: > On Fri, Aug 5, 2016 at 9:19 AM, Tom Worster wrote: > > > On 8/5/16 8:47 AM, Charles R. Portwood II wrote: > > Finally, I wonder if it wouldn't be better if, for the time being, we >

Re: [PHP-DEV] optionally return class name from gettype

2016-07-29 Thread Ryan Pallas
I love this idea (as I've written much the same code before), I do think it will require a full RFC though. On Fri, Jul 29, 2016 at 7:53 AM, Timothy Younger wrote: > hi Internals Team, > > i find myself writing this line frequently in projects: > > is_object($value) ?

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-22 Thread Ryan Pallas
On Fri, Jul 22, 2016 at 1:31 AM, Michael Vostrikov < michael.vostri...@gmail.com> wrote: > > > The trick with the magic class name and namespace aliasing is neat, but > feels likely to confuse a lot of users > > Yes, I have to agree. Maybe more better way is to make it similar to >

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-20 Thread Ryan Pallas
On Wed, Jul 20, 2016 at 12:17 PM, Michael Vostrikov < michael.vostri...@gmail.com> wrote: > > Personally I don't know any developer who is using raw php in project > without template engine > > Zend, Yii, various CMS like Wordperss, internal business-applications - in > many cases such projects

Re: [PHP-DEV] New escaped output operator

2016-06-30 Thread Ryan Pallas
On Thu, Jun 30, 2016 at 1:35 PM, Михаил Востриков < michael.vostri...@gmail.com> wrote: > > > - Other people will ask about operator for another context > And you can say: We already added an operator for the main web context, > because it is the most frequently used context. If you have a lot of

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

2016-06-05 Thread Ryan Pallas
On Sun, Jun 5, 2016 at 6:09 AM, Robert Stoll wrote: > Hi Andrea, Bob > > > -Ursprüngliche Nachricht- > > Von: Bob Weinand [mailto:bobw...@hotmail.com] > > Gesendet: Sonntag, 5. Juni 2016 01:00 > > An: Andrea Faulds > > Cc: internals@lists.php.net > > Betreff: Re:

Re: [PHP-DEV] Set object properties inline

2016-06-01 Thread Ryan Pallas
On Wed, Jun 1, 2016 at 9:37 AM, Matt Fonda wrote: > > > Hi Jesse, > > It's fairly straightforward to implement a function that does this in > userland, for example something like the following: > > function f($fqcn, $args) { > $instance = new $fqcn; > foreach

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

2016-05-27 Thread Ryan Pallas
On Fri, May 27, 2016 at 6:34 AM, Lester Caine wrote: > On 27/05/16 11:25, Fleshgrinder wrote: > > On 5/27/2016 11:41 AM, Lester Caine wrote: > >> Now I am confused, but it's probably because I'm looking at a simple > >> > >> $f->d = new DateTime( $initial ); > >> > >> While

Re: [PHP-DEV] Exception::getLine()

2016-05-19 Thread Ryan Pallas
On Thu, May 19, 2016 at 1:47 PM, Rowan Collins wrote: > On 19/05/2016 19:35, Rasmus Schultz wrote: > >> Technically, every throw is a new exception "flow" - even if you're > >> recycling the Exception instance, it's the throw statement that > >> > starts the unique stack

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-17 Thread Ryan Pallas
On Tue, May 17, 2016 at 6:15 AM, François Laupretre wrote: > > > >> The question of function aliases is not so serious because we'll need very >>> few. Almost every functions have only one 'natural' argument to >>> substitute >>> as lhs. I'm not sure I understand what you mean

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-03 Thread Ryan Pallas
On Tue, May 3, 2016 at 2:35 PM, Fleshgrinder <p...@fleshgrinder.com> wrote: > On 5/3/2016 10:22 PM, Ryan Pallas wrote: > > I have to disagree, I haven't seen an example of rewriting the original > > example from the RFC in a more expressive AND readable way. Yes,

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-03 Thread Ryan Pallas
On Tue, May 3, 2016 at 1:28 PM, Fleshgrinder wrote: > On 5/3/2016 8:57 PM, Sara Golemon wrote: > > Ooops, missed a negation when I typed it out. > > > > "Pretending that poorly designed libraries DON'T exist is naîve." > > > > I am not pretending that they do not exist,

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Ryan Pallas
On Fri, Apr 29, 2016 at 10:50 AM, Lester Caine wrote: > On 29/04/16 16:42, Rowan Collins wrote: > > function foo($a) { > > if ( $a < 42 ) { throw new Exception; } // Must not reach The Answer > > ... > > } > > > > vs > > > > <> // Must not reach The Answer > >

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Ryan Pallas
On Fri, Apr 29, 2016 at 9:18 AM, Lester Caine wrote: > On 29/04/16 14:51, Rowan Collins wrote: > > Lester Caine wrote on 29/04/2016 14:18: > >> But where will annotations like @range(0,110) fit in the new model? > >> Along with the likes of '@notnull' and similar annotations

Re: [PHP-DEV] [RFC] PHP Attributes

2016-04-21 Thread Ryan Pallas
On Thu, Apr 21, 2016 at 4:51 PM, Dmitry Stogov wrote: > > >> About expressions, isn't there an ambigoutiy? <> is a "plain" >> name, value based attribute. But it could also be an ast\node of a function >> call to "test(1)" >> > even in AST scalars are scalars. > so

Re: [PHP-DEV] Quick sanity check ...

2016-04-20 Thread Ryan Pallas
On Wed, Apr 20, 2016 at 2:01 PM, Stanislav Malyshev wrote: > Hi! > > > The outcome is easy to grasp. Because it did not crash by a TypeError > > (which would also require the file to be declared as strict), and we lost > > 100k in sales. But PHP does not need more

Re: [PHP-DEV] [RFC:generics]

2016-04-20 Thread Ryan Pallas
On Wed, Apr 20, 2016 at 1:17 PM, Dominic Grostate < codekest...@googlemail.com> wrote: > Thanks for you're input everyone. > > So far, we have read some ideas for handling upper bounds, or multiple > there of. > The preferred keywords appear to be either "as" or "instanceof". > > class Foo {} >

Re: [PHP-DEV] Re: Improving PHP's type system

2016-04-16 Thread Ryan Pallas
On Sat, Apr 16, 2016 at 4:10 AM, Bastian Schneider < bastian.schnei...@commerce-plus.com> wrote: > > Just a quick thought. I would prefer something like > > union Iterable { > use array; > use ArrayAccess; > use Traversable; > } > > function bla(Iterable

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

2016-03-29 Thread Ryan Pallas
On Tue, Mar 29, 2016 at 5:16 PM, Levi Morrison wrote: > > 2) The handling of multiple properties in the same declaration statement > is inconsistent. > > > > public int $bar, string $qux; // this works > > > > public int $bar, $qux; //this emits error: Untyped

Re: [PHP-DEV] Why is 0x7F permitted in PHP identifiers?

2016-03-25 Thread Ryan Pallas
On Fri, Mar 25, 2016 at 1:25 PM, Scott Arciszewski wrote: > On Fri, Mar 25, 2016 at 10:20 AM, Andrea Faulds wrote: > > > Hi everyone, > > > > Identifiers in PHP source code (including variables names with $) conform > > to the regex

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-24 Thread Ryan Pallas
Hi Nikita, On Thu, Mar 24, 2016 at 11:50 AM, Nikita Popov wrote: > Hi internals! > > For consistency, we should add a spaceship assignment operator: > > $a <=>= $b; > // same as > $a = ($a <=> $b); > I'm not sure I see a use case for this, when do you compare

Re: [PHP-DEV] [RFC] [Vote] Short Ternary Assignment Operator

2016-03-24 Thread Ryan Pallas
On Thu, Mar 24, 2016 at 9:51 AM, Sara Golemon wrote: > Following on from Midori, I've moved the short-ternary assignment > operator RFC into voting phase. > The implementation for which will be her patch with appropriately > different symbols and tests. >

Re: [PHP-DEV] [RFC][Voting] Null Coalesce Equal Operator

2016-03-24 Thread Ryan Pallas
On Thu, Mar 24, 2016 at 9:02 AM, Midori Kocak wrote: > Hi, > > Remember Null coalesce Equal Operator ??= She is in voting phase now. :) > > https://wiki.php.net/rfc/null_coalesce_equal_operator < > https://wiki.php.net/rfc/null_coalesce_equal_operator> I don't get to vote,

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

2016-03-18 Thread Ryan Pallas
On Wed, Mar 16, 2016 at 12:50 PM, Larry Garfield wrote: > On 3/16/16 11:36 AM, Phil Sturgeon wrote: > >> >> 2. This whole temporary nullability situation, where unset properties >> will error on attempted usage if not set. Should they instead error >> after the

Re: [PHP-DEV] [RFC Proposal] Null Coalesce Equal Operator

2016-03-09 Thread Ryan Pallas
On Wed, Mar 9, 2016 at 11:14 AM, Midori Kocak wrote: > Hi all, > > Remember my question about ??= operator? > > Forgive my rookieness and let me introduce my first RFC here: > https://wiki.php.net/rfc/null_coalesce_equal_operator < >

Re: [PHP-DEV] [RFC] Callable constructors

2016-02-25 Thread Ryan Pallas
On Thu, Feb 25, 2016 at 11:31 AM, Ryan Pallas <derokor...@gmail.com> wrote: > > > On Thu, Feb 25, 2016 at 11:20 AM, Marco Pivetta <ocram...@gmail.com> > wrote: > >> Just adding to the use-cases: I really could've needed this the other day: >> >

Re: [PHP-DEV] [RFC] Callable constructors

2016-02-25 Thread Ryan Pallas
On Thu, Feb 25, 2016 at 11:20 AM, Marco Pivetta wrote: > Just adding to the use-cases: I really could've needed this the other day: > > > $records = array_map([MyRecord::class, '__construct'], > $db->someQuery()->fetchAll()); > > I used a named constructor instead, but this

Re: [PHP-DEV] [RFC] Callable constructors

2016-02-25 Thread Ryan Pallas
On Thu, Feb 25, 2016 at 9:44 AM, Dan Ackroyd wrote: > Hello internals, > > I've written a small RFC to make it possible to call constructors of > objects as a callable, rather than only being able to call them > through the 'new' language construct. > >

Re: [PHP-DEV] Re: Internals and Newcomers and the Sidelines (WAS: Adopt Code of Conduct)

2016-01-13 Thread Ryan Pallas
On Wed, Jan 13, 2016 at 7:55 AM, Rouven Weßling wrote: > > > On 13 Jan 2016, at 14:57, Zeev Suraski wrote: > > > > I don't see it that way. I think I provided very relevant feedback - > that yes, called for a very substantial revision of the proposal and a

Re: [PHP-DEV] [RFC] [Draft] Adopt Code of Conduct

2016-01-08 Thread Ryan Pallas
On Fri, Jan 8, 2016 at 10:28 AM, Paul M. Jones wrote: > > > On Jan 7, 2016, at 23:52, Larry Garfield wrote: > > > > Do you think we can find 5 people in the PHP community that we can trust > to make fair decisions (NOT that we would always agree

Re: [PHP-DEV] Deprecation of the Error Control Operator (@ symbol)

2016-01-08 Thread Ryan Pallas
On Fri, Jan 8, 2016 at 11:21 AM, Stanislav Malyshev wrote: > Hi! > > > $counts[$item] ?? $counts[$item] = 1 ?? $counts[$item]++; > > This looks completely unreadable and I do not think it works: > https://3v4l.org/PlAHH > Seems to leave $counts as 1 always. But even if it

Re: [PHP-DEV] [RFC] [Draft] Adopt Code of Conduct

2016-01-08 Thread Ryan Pallas
On Fri, Jan 8, 2016 at 10:58 AM, Paul M. Jones <pmjone...@gmail.com> wrote: > > > On Jan 8, 2016, at 11:51, Ryan Pallas <derokor...@gmail.com> wrote: > > > > I would prefer to see the team picked for the next occurence immediately > after one happe

Re: [PHP-DEV] [RFC] [Draft] Adopt Code of Conduct

2016-01-08 Thread Ryan Pallas
On Fri, Jan 8, 2016 at 1:06 PM, Paul M. Jones wrote: > > > On Jan 8, 2016, at 13:50, Larry Garfield wrote: > > > > On 1/8/16 12:31 PM, Paul M. Jones wrote: > >>> On Jan 8, 2016, at 12:16, Larry Garfield > wrote: > >>> > >>>

Re: [PHP-DEV] Implementing Generics, and none scalar default properties.

2016-01-07 Thread Ryan Pallas
Hi Ben and Rasmus, On Thu, Jan 7, 2016 at 6:24 PM, Ben Scholzen 'DASPRiD' wrote: > By the way, Rasmus updated the RFC quite a bit, you guys may want to take > a look at it again. > > I just have a couple questions about the rfc, but overall I think its great and I really hope

Re: [PHP-DEV] Deprecation of the Error Control Operator (@ symbol)

2016-01-06 Thread Ryan Pallas
Hi Dan, On Wed, Jan 6, 2016 at 10:12 AM, Dan Ackroyd wrote: > > > // If FileException, NetworkException are thrown inside 'foo', > // they are automatically > // caught and execution continues to call bar() > foo() suppress FileException, NetworkException; > bar(); > > >

Re: [PHP-DEV] [RFC] [Draft] Adopt Code of Conduct

2016-01-06 Thread Ryan Pallas
On Wed, Jan 6, 2016 at 12:28 PM, Paul M. Jones wrote: > > > On Jan 6, 2016, at 13:13, Andrea Faulds wrote: > > > > Furthermore, if people think the CoC enforcement team have been too > heavy-handed with their application of the code, the team can be replaced. >

Re: [PHP-DEV] [RFC] [Draft] Adopt Code of Conduct

2016-01-05 Thread Ryan Pallas
On Jan 5, 2016 7:32 AM, "Peter Lind" wrote: > > > > > +1. The proposed CoC is too vague for a multi-cultural environment like > > ours. Reference to ethics, for example, is subjective by nature. But I'm OK > > for a more precise text that everybody must explicitely approve

Re: [PHP-DEV] PHP 7.0.0 final RTM delay

2015-12-04 Thread Ryan Pallas
On Fri, Dec 4, 2015 at 11:01 AM, Sebastian Bergmann wrote: > Am 04.12.2015 um 18:53 schrieb Florian Anderiasch: > > I hate to say it, but not providing an official Windows build is kind of > > sticking the finger to everyone using Windows for PHP (not the language) > >

Re: [PHP-DEV] Re: PHP 7.0.0 final has been released!

2015-12-03 Thread Ryan Pallas
On Thu, Dec 3, 2015 at 1:59 PM, Jan Ehrhardt wrote: > a...@php.net in php.internals (Thu, 3 Dec 2015 21:46:00 +0100): > >Congratulations everyone to this spectacular day for the PHP world! > >Grateful thanks to all the contributors and supporters! > > I want to congratulate

Re: [PHP-DEV] Scalar Type Declaration Syntax Weirdness

2015-11-24 Thread Ryan Pallas
On Tue, Nov 24, 2015 at 8:10 AM, Sebastian Bergmann wrote: > The following is currently valid PHP 7 code > >function a(\int $i) {} > > Is it intentional that the \ in front of the "int" is allowed? IMHO, this > confusing notation must not be allowed. > > > Why

Re: [PHP-DEV] PHP7 Coalesce operator

2015-11-23 Thread Ryan Pallas
Well use null coalesce + elvis together then? // Coalesce possible null values, and use truthy comparison in elvis to "coalesce" to a default $var = ($_GET['possible_value'] ?? $_COOKIE['secondary'] ?? false) ?: DEFAULTS['var']; On Mon, Nov 23, 2015 at 1:16 PM, shadda wrote:

Re: [PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments

2015-10-15 Thread Ryan Pallas
On Thu, Oct 15, 2015 at 1:46 PM, Sara Golemon <poll...@php.net> wrote: > On Thu, Oct 15, 2015 at 12:16 PM, Ryan Pallas <derokor...@gmail.com> > wrote: > > But its an entirely stylistic choice to use trailing commas for cleaner > > diffs. You could also use leadin

Re: [PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments

2015-10-15 Thread Ryan Pallas
On Thu, Oct 15, 2015 at 1:32 PM, Pedro Cordeiro wrote: > > Wouldn't this give the same benefit as trailing commas when it comes to > > adding removing arguments - a single line diff? > > It would. > > However, I see some merit in someone wanting trailing commas for diffs.

Re: [PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments

2015-10-15 Thread Ryan Pallas
On Thu, Oct 15, 2015 at 11:14 AM, Sara Golemon wrote: > On Wed, Oct 14, 2015 at 11:59 PM, Björn Larsson > wrote: > > Given the reason against this RFC in the thread it would be interesting > > to know why HHVM decided to implement it? > > > > Happy to

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Ryan Pallas
On Wed, Oct 14, 2015 at 4:46 PM, Levi Morrison wrote: > > > I agree that `void` doesn't make sense given that we document that > `return;` will return null[1]. If the union types RFC[2] passes it > makes sense to allow `Foo | null` which allows something of type `Foo` > or `null`.

Re: [PHP-DEV] Regarding contribution

2015-10-11 Thread Ryan Pallas
On Sun, Oct 11, 2015 at 3:12 PM, er.atul.jindal wrote: > Hello Dear, > > I am php programmer, working on LAMP Stack from couple of years. I am > interested to work for PHP manual and make contributions to manual. > > Kindly suggest, how I could be the part of community.

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Ryan Pallas
On Thu, Oct 1, 2015 at 8:58 AM, Nikita Nefedov wrote: > > I don't think there was a dozen of different ideas, I could only find > those about `lambda(arg-list; use-list; expression)` and variations of it > with different keywords and different return-type syntax. > I do

Re: [PHP-DEV] [RFC] [DISCUSSION]: Closure from callable

2015-09-29 Thread Ryan Pallas
On Tue, Sep 29, 2015 at 8:23 AM, Dan Ackroyd wrote: > Hello internals, > > I'd like to start a discussion of a proposal to allow closures to be > created in user-land without having to use a whole lot of reflection > code. > > https://wiki.php.net/rfc/closurefromcallable

Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28?

2015-09-23 Thread Ryan Pallas
On Wed, Sep 23, 2015 at 12:27 PM, Rowan Collins wrote: > > > My suggestion (with which I believe Stig was agreeing) is this: > > variable_exists('foo'): yes (should be yes) > unset($foo); > variable_exists('foo'): no (should be no) > variable_exists('bar'): no (should be

Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28?

2015-09-19 Thread Ryan Pallas
On Sat, Sep 19, 2015 at 5:29 PM, Lester Caine wrote: > On 19/09/15 22:56, Rowan Collins wrote: > >>> If what you want to do is avoid the notice, then you don't need to > >>> "find out before calling is_null", you need to call isset *instead > >>> of* is_null. Again, ignore

Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28?

2015-09-18 Thread Ryan Pallas
On Fri, Sep 18, 2015 at 9:35 AM, Rowan Collins wrote: > > > If what you want to write is "if ( ! exists($foo) || is_null($foo) ) { ... > }" then that is exactly what "if ( isset($foo) )" will give you, without > any notices whatsoever. Conversely, if what you want to

Re: [PHP-DEV] Let's discuss enums!

2015-09-17 Thread Ryan Pallas
I few questions wrt the rfc: https://wiki.php.net/rfc/enum > An enum value is only equal to itself. I'm not sure I agree. How then do I store the enum into a DB and compare it after reading? switch($db->query('select role from user where user_id = 123')->fetch()[0]) { case UserRole::Admin:

Re: [PHP-DEV] Suggestion: Adding PUT, PATCH and DELETE

2015-09-14 Thread Ryan Pallas
On Mon, Sep 14, 2015 at 3:22 PM, Daniel Persson wrote: > Hi. > > I've not been a member for too long so I might have missed if this have > been discussed earlier. > > But I've created a small PR to the basic request handling to support PUT, > PATCH and DELETE. > >

Re: [PHP-DEV] Re: [RFC] [Concept] Class Constant visibility modifiers in PHP 7.1+

2015-09-07 Thread Ryan Pallas
On Mon, Sep 7, 2015 at 6:24 AM, Ryan Pallas <derokor...@gmail.com> wrote: > > > On Mon, Sep 7, 2015 at 1:02 AM, Stanislav Malyshev <smalys...@gmail.com> > wrote: > >> Hi! >> >> > Funny you should propose this now, I was wanting this feature just the

Re: [PHP-DEV] Re: [RFC] [Concept] Class Constant visibility modifiers in PHP 7.1+

2015-09-07 Thread Ryan Pallas
On Mon, Sep 7, 2015 at 1:02 AM, Stanislav Malyshev wrote: > Hi! > > > Funny you should propose this now, I was wanting this feature just the > > other day. This would be a useful addition, and clean up a strange > > inconsistency: why can methods and properties have

Re: [PHP-DEV] Re: [RFC] [Concept] Class Constant visibility modifiersin PHP 7.1+

2015-09-07 Thread Ryan Pallas
On Mon, Sep 7, 2015 at 7:11 PM, Xinchen Hui wrote: > > > Sent from my iPhone > > > On Sep 8, 2015, at 02:09, Andrea Faulds wrote: > > > > Hi Stas, > > > > Stanislav Malyshev wrote: > >> > >> Private and protected methods and properties are private for a reason -

Re: [PHP-DEV] PHP 7.1 - Address PHPSadness #28?

2015-08-26 Thread Ryan Pallas
On Wed, Aug 26, 2015 at 11:08 AM, Craig Francis cr...@craigfrancis.co.uk wrote: On 26 Aug 2015, at 16:44, Stanislav Malyshev smalys...@gmail.com wrote: Depending on the website I may then add a key to define the 'report-uri', or I may set it to NULL to say that I don't want one. NULL is

Re: [PHP-DEV] set_exception_handler catches all Throwables

2015-08-19 Thread Ryan Pallas
On Aug 19, 2015 6:44 AM, Björn Larsson bjorn.x.lars...@telia.com wrote: Plan to migrate to PHP 7 later, like the new Exception/Error way of working very much. Point is that current set_exception_handler only address exceptions, not errors. You are right that on that the surface it's the same

Re: [PHP-DEV] json_decode/encode should return full precision values by default

2015-07-29 Thread Ryan Pallas
On Wed, Jul 29, 2015 at 5:25 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi all, On Thu, Jul 30, 2015 at 7:44 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: On Thu, Jul 30, 2015 at 1:13 AM, Nikita Popov nikita@gmail.com wrote: Instead of continuing to use serialize_precision, which

  1   2   >