Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@teru855

Arrays are not allowed in class constants in....

PHPでsyntaxcheckを行った際の出来事。
gitで他のソースをマージして、コミットしようとしたら(コミットする際にシンタックスチェックが走る)以下のエラーが…

PHP Fatal error:  Arrays are not allowed in class constants in /PATH/TO/FILE.php on line 10

調べてみると、クラス内変数として,
const $arr = array();
と宣言できるようになったのは,PHP5.6からみたいです.

ちなみにMacOS10.11ではPHP5.5が初期インストールされている様です。

PHP 5.5.38 (cli) (built: Aug 21 2016 21:48:49)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

PHPは最新に上げてこうな!

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?