On 23.09.2015 22:35, Dominic Grostate wrote:
So far so good, but function calls are more complicated. I'm getting error:
shift/reduce conflicts
My guess is this due to the following scenario:
<?php
define('const_a', 1);
define('const_b', 2);
$result = const_a < const_b > (10);
While the intention might be to call a "function" const_a with the generic type
const_b and 10 as an argument, it is also identical to a comparison expression.
The example above throws: Parse error: syntax error, unexpected '>' since the
expression is erroneous , so should that allowa generic type to be included to the
syntax?
Hm, this is indeed an "interesting" issue I didn't think about when
writing up the RFC. Sadly, I have no idea about how to solve this issue.
If you have no idea either on how to solve this, I'd suggest to skip
generic methods for now and concentrate on generic classes only.
--
Ben Scholzen 'DASPRiD'
Community Review Team Member | m...@dasprids.de
Zend Framework | http://www.dasprids.de
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php