3v4l.org

run code in 300+ PHP versions simultaneously
<?php class helloWorld { const ONE = 1; public $array = array( 'VALUE FIRST', 'VALUE SECOND', 'VALUE THIRD', ); public function getShit () { $this->array[self::ONE] = 'hugo'; return $this->array; } } $hello = new helloWorld(); $hello->array[1] = 'sas'; print_r($hello->getShit());

preferences:
64.86 ms | 402 KiB | 5 Q