3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Horde_Translation { /** * The translation domain, e.g. the library name, for the default gettext * handler. * * @var string */ protected static $_domain; /** * The relative path to the translations for the default gettext handler. * * @var string */ protected static $_directory; /** * The handlers providing the actual translations. * * @var array */ protected static $_handlers = array(); /** * Loads a translation handler class pointing to the library's translations * and assigns it to $_handler. * * @param string $handlerClass The name of a class implementing the * Horde_Translation_Handler interface. */ public static function loadHandler($handlerClass) { if (!static::$_domain || !static::$_directory) { throw new Exception('The domain and directory properties must be set by the class that extends Horde_Translation.'); } echo "Success"; } public static function t($message) { if (!isset(static::$_handlers[static::$_domain])) { static::loadHandler('Horde_Translation_Handler_Gettext'); } return static::$_handlers[static::$_domain]->t($message); } } abstract class Horde_Translation_Autodetect extends Horde_Translation { /** * The absolute PEAR path to the translations for the default gettext handler. * * This value is automatically set by PEAR Replace Tasks. * * @var string */ protected static $_pearDirectory; /** * Auto detects the locale directory location. * * @param string $handlerClass The name of a class implementing the * Horde_Translation_Handler interface. */ public static function loadHandler($handlerClass) { if (!static::$_domain) { throw new Exception('The domain property must be set by the class that extends Horde_Translation_Autodetect.'); } $directory = '/tmp'; if (!$directory) { throw new Exception(sprintf('Could not found find any locale directory for %s domain.', static::$_domain)); } static::$_directory = $directory; parent::loadHandler($handlerClass); } } class Horde_Core_Translation extends Horde_Translation_Autodetect { /** * The translation domain * * @var string */ protected static $_domain = 'Horde_Core'; /** * The absolute PEAR path to the translations for the default gettext handler. * * @var string */ protected static $_pearDirectory = '@data_dir@'; } Horde_Core_Translation::t("A fatal error has occurred")

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.0100.08020.12
7.0.00.0070.08019.98
5.6.160.0100.05020.50
5.6.150.0070.03718.16
5.6.140.0100.07718.18
5.6.130.0200.02718.19
5.6.120.0130.07720.98
5.6.110.0070.08721.00
5.6.100.0130.08021.03
5.6.90.0100.08021.08
5.6.80.0070.06020.40
5.5.300.0070.08017.96
5.5.290.0130.08017.99
5.5.280.0100.07720.79
5.5.270.0130.08020.94
5.5.260.0170.06320.86
5.5.250.0100.07320.56
5.5.240.0170.07020.27

preferences:
143.99 ms | 1394 KiB | 7 Q