Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

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は最新に上げてこうな!

teru855
toreta
飲食店向け予約/顧客台帳サービス「トレタ」、超直前予約アプリ「トレタnow」を開発・提供するスタートアップ企業です。
https://corp.toreta.in
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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした