3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const FIRST = 1; public $array = array( self::FIRST => 'first', 'second', 'third' ); } $x = new Test; var_dump($x->array);

preferences:
31.53 ms | 402 KiB | 5 Q