3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { const TESTING = ['a', 'b']; public function getTesting() { return static::TESTING; } } class B extends A { const TESTING = ['c']; } $object = new B(); $object->getTesting();
Output for 5.6.0 - 5.6.30, hhvm-3.21.3 - 3.22.0, 7.0.0 - 7.3.0rc3
Output for hhvm-3.18.5
Fatal error: Uncaught Error: Arrays are not allowed in class constants in /in/g22RF:3 Stack trace: #0 {main}
Process exited with code 255.