3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { const TEST = ['test', 'anoter']; public function test_this() { var_dump(self::TEST); } } $test = new Test(); $test->test_this();
based on mdnVO
Output for 5.6.0 - 7.3.0beta1
array(2) { [0]=> string(4) "test" [1]=> string(6) "anoter" }
Output for 5.5.0 - 5.5.35
Fatal error: Arrays are not allowed in class constants in /in/ANYB5 on line 3
Process exited with code 255.