Hi Sebastian,

Sebastian Bergmann wrote:
  The following is currently valid PHP 7 code

      <?php
      function a(\int $i) {}

  Is it intentional that the \ in front of the "int" is allowed? IMHO, this
  confusing notation must not be allowed.

This is weird and I'd consider it a bug. You can't do \array or \callable, and if I saw \int, I'd think it meant a class of that name rather than a scalar type.

Can this be fixed for 7.0.0?

Thanks.

--
Andrea Faulds
http://ajf.me/

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

Reply via email to