3v4l.org

run code in 300+ PHP versions simultaneously
<?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() . ')';

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).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.10.0030.04320.16
7.0.00.0030.06720.22
5.6.160.0030.07720.71
5.6.150.0070.04718.14
5.6.140.0000.04318.19
5.6.130.0000.05718.28
5.6.120.0130.05021.04
5.6.110.0100.08321.00
5.6.100.0030.05320.99
5.6.90.0030.04321.11
5.6.80.0070.07720.41
5.5.300.0000.04718.09
5.5.290.0230.07017.95
5.5.280.0070.05320.86
5.5.270.0000.04320.88
5.5.260.0100.05320.98
5.5.250.0030.07320.44
5.5.240.0130.05320.17

preferences:
138.24 ms | 1394 KiB | 7 Q