Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-13 Thread Simon Welsh
> On 14/08/2016, at 2:47 AM, w...@wkhudgins.info wrote: > > On 2016-08-13 04:34, Simon Welsh wrote: >>> On 2/08/2016, at 8:52 AM, w...@wkhudgins.info wrote: >>> Hello, >>> I recently emailed the group about submitting an RFC for str_begins() and >>&g

Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions

2016-08-13 Thread Simon Welsh
ely to be other projects that do too. [1]: https://github.com/sugarcrm/sugarcrm_dev/blob/ae189cfa4ed4edd6a4e1e0d9d1d5ec66f46a0b74/include/utils.php#L2082-L2090 -- Simon Welsh signature.asc Description: Message signed with OpenPGP using GPGMail

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

2016-05-13 Thread Simon Welsh
ng in as the first. To have the position of the piped variable be implicit, you’ll need multiple versions of in_array. Sure, you could try to use the type of the value being passed in, but that ends up much more magic and then you run into the same problem with strpos, or password_verify, or a variety of other functions that take multiple of the same type of argument where order matters. This approach will greatly reduce the power of this feature, making it much less useful for things beyond examples. -- Simon Welsh smime.p7s Description: S/MIME cryptographic signature

Re: [PHP-DEV] Interpolation using ${} syntax with spaces inside the braces

2016-04-14 Thread Simon Welsh
n PHP when using array access, depending on if the label starts with a space or not (https://3v4l.org/YPXkr). This behaviour is inconsistent with not using array access. HHVM follows the <=PHP5.5 behaviour of not allowing array access on a constant. However, there is the massive BC break if the handling inside a string changes -- Simon Welsh smime.p7s Description: S/MIME cryptographic signature