PHP 7 與 PHP 5.6 的不相容改變

在「Migrating To PHP 7」這邊看到十一月 PHP 就要發行 7.0.0 了...

最主要的還是不相容性的問題,從「Backward incompatible changes」這邊可以看到官方列出來的說明。

在「Changes to the handling of indirect variables, properties, and methods」這邊看起來好刺激啊,整個解讀的方法完全不一樣了... 不過我記得這是最近的 PHP 才有的功能?而且這樣寫真的很不容易讀懂...

然後「list() no longer assigns variables in reverse order」這種寫法的 code 就臭臭的,是在示範各種 side effect 嗎 XDDD

而「Hexadecimal strings are no longer considered numeric」則是往好的方向改?原來 is_numeric('0x1234') 在 PHP 5.6 是 true 啊...

大概又要檢查再確認才能升級了 :o

One thought on “PHP 7 與 PHP 5.6 的不相容改變”

Leave a Reply

Your email address will not be published. Required fields are marked *