On 27.07.2016 at 13:53, Michał Brzuchalski:

> 2016-07-27 12:24 GMT+02:00 Christoph Becker <cmbecke...@gmx.de>:
> 
>> However, that still would require something like
>>
>>   $str[0..mb_strlen($needle)-1] == $needle
> 
> I've been working on range operator some time ago and had problem with
> double-dot ".." as an operator because of conflict with concat operator.
> 0..5 could be 0. . 5, or 0 . .5 white spaces are problem here,
> unfortunately dot is concat operator and decimal separator.

Well, there's a similar issue with `- -$n` vs. `--$n` anyway, but of
course we could use something else than `..` (`:` comes to mind; not
sure if that would work).

-- 
Christoph M. Becker


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to