@ 2015-12-22T11:11:58Z <?php
class ServerName
{
/**
* All the Adjectives
*
* @var array
*/
public static $allTheAdjectives = [
'magic', 'blazing', 'dark', 'empty', 'super', 'royal', 'super', 'limitless', 'obsidian', 'light', 'shining', 'glowing',
];
/**
* All the Nouns
*
* @var array
*/
public static $allTheNouns = [
'nebula', 'spectrum', 'earth', 'jupiter', 'comet', 'asteroid', 'comet', 'cosmos', 'ecliptic', 'galaxy', 'planet', 'planetoid', 'quasar', 'sky', 'star', 'nova', 'orion', 'meteor', 'moon', 'orbit',
];
/**
* The Adjective
*
* @var string
*/
public $adjective = '';
/**
* The Noun
*
* @var string
*/
public $noun = '';
/**
* __construct
*/
public function __construct()
{
$this->generate();
}
/**
* Returns the Server in Title Case
*
* @return
*/
public function title()
{
return ucwords($this->adjective.' '.$this->noun);
}
/**
* Returns the Server in Title Case
*
* @return
*/
public function slug()
{
return strtolower($this->adjective.'-'.$this->noun)
}
/**
* Generate a Random Server Name
*/
private function generate()
{
$this->adjective = self::$allTheAdjectives[mt_rand(0, count(self::$allTheAdjectives) - 1)];
$this->noun = self::$allTheNouns[mt_rand(0, count(self::$allTheNouns) - 1)];
}
}
$server = new ServerName();
echo $server->title() . ' - (' . $server->slug() . ')';
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.0.1 0.003 0.043 20.16 7.0.0 0.003 0.067 20.22 5.6.16 0.003 0.077 20.71 5.6.15 0.007 0.047 18.14 5.6.14 0.000 0.043 18.19 5.6.13 0.000 0.057 18.28 5.6.12 0.013 0.050 21.04 5.6.11 0.010 0.083 21.00 5.6.10 0.003 0.053 20.99 5.6.9 0.003 0.043 21.11 5.6.8 0.007 0.077 20.41 5.5.30 0.000 0.047 18.09 5.5.29 0.023 0.070 17.95 5.5.28 0.007 0.053 20.86 5.5.27 0.000 0.043 20.88 5.5.26 0.010 0.053 20.98 5.5.25 0.003 0.073 20.44 5.5.24 0.013 0.053 20.17
preferences:dark mode live preview
138.24 ms | 1394 KiB | 7 Q