On 5 January 2015 at 01:07, Andrea Faulds <a...@ajf.me> wrote: > Hi Stas, > > > On 4 Jan 2015, at 23:58, Stanislav Malyshev <smalys...@gmail.com> wrote: > > > >> I think it's perfectly acceptable that PHP makes a built-in type a > >> reserved word. I would certainly not change it to PHPInt to "avoid any > >> obvious clashes". > > > > As I already pointed out, if we make it reserved word we'll have BC > > problem. We already had this experience when goto became reserved word - > > it resulted in a lot of breakage. This would be bigger, since we adding > > more reserved words and we know they are used in a lot of class names > > (and, possibly, method names too). > > It is a BC problem, yes. However, it can be worked around in userland in a > way where unchanged code will continue to work on PHP 5, and changed code > will work on both PHP 5 and PHP 7. I think the BC break is worth it, though > unfortunate. I also wonder why we hadn’t reserved these names before, it > seems rather silly that you were ever able to make a class called “integer” > or “array”.
Note that this kind of BC break will gladly be fixed in major libraries out there: we can rename those classes and announce the breakages ourselves without too many problems. The best way to eagerly detect this sort of problem would be to have a php-nightly version on travis-ci, and then we could handle it ourselves and without too much pain (already trying to get there, and mbeccati has a CI system running with php7 and some major libs). The only trouble that could eventually come up is with legacy software that isn't tested at all. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/