Skip to content

Instantly share code, notes, and snippets.

@dlsniper
Created January 13, 2013 20:49
Show Gist options
  • Save dlsniper/4526170 to your computer and use it in GitHub Desktop.
Save dlsniper/4526170 to your computer and use it in GitHub Desktop.
isset, array_key_exists and isset || array_key_exists speed test
<?php
$demo = array(
'kernel.root_dir' => '/var/www/personal/symfony/app',
'kernel.environment' => 'prod',
'kernel.debug' => false,
'kernel.name' => 'app',
'kernel.cache_dir' => '/var/www/personal/symfony/app/cache/prod',
'kernel.logs_dir' => '/var/www/personal/symfony/app/logs',
'kernel.bundles' => array(
'FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle',
'AsseticBundle' => 'Symfony\\Bundle\\AsseticBundle\\AsseticBundle',
'DoctrineBundle' => 'Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle',
'SwiftmailerBundle' => 'Symfony\\Bundle\\SwiftmailerBundle\\SwiftmailerBundle',
'MonologBundle' => 'Symfony\\Bundle\\MonologBundle\\MonologBundle',
'TwigBundle' => 'Symfony\\Bundle\\TwigBundle\\TwigBundle',
'SensioFrameworkExtraBundle' => 'Sensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle',
'SecurityBundle' => 'Symfony\\Bundle\\SecurityBundle\\SecurityBundle',
'JMSAopBundle' => 'JMS\\AopBundle\\JMSAopBundle',
'JMSDiExtraBundle' => 'JMS\\DiExtraBundle\\JMSDiExtraBundle',
'JMSSecurityExtraBundle' => 'JMS\\SecurityExtraBundle\\JMSSecurityExtraBundle',
'AcmeDemoBundle' => 'Acme\\DemoBundle\\AcmeDemoBundle',
),
'kernel.charset' => 'UTF-8',
'kernel.container_class' => 'appProdProjectContainer',
'database_driver' => 'pdo_mysql',
'database_host' => 'sf2',
'database_port' => NULL,
'database_name' => 'sf2demo',
'database_user' => 'root',
'database_password' => 'x',
'mailer_transport' => 'smtp',
'mailer_host' => '127.0.0.1',
'mailer_user' => NULL,
'mailer_password' => NULL,
'locale' => 'en',
'secret' => 'ThisTokenIsNotSoSecretChangeIt',
'controller_resolver.class' => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver',
'controller_name_converter.class' => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser',
'response_listener.class' => 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener',
'streamed_response_listener.class' => 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener',
'locale_listener.class' => 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener',
'event_dispatcher.class' => 'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher',
'http_kernel.class' => 'Symfony\\Bundle\\FrameworkBundle\\HttpKernel',
'filesystem.class' => 'Symfony\\Component\\Filesystem\\Filesystem',
'cache_warmer.class' => 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate',
'cache_clearer.class' => 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer',
'file_locator.class' => 'Symfony\\Component\\HttpKernel\\Config\\FileLocator',
'uri_signer.class' => 'Symfony\\Component\\HttpKernel\\UriSigner',
'http_content_renderer.class' => 'Symfony\\Component\\HttpKernel\\HttpContentRenderer',
'http_content_renderer.strategy.default.class' => 'Symfony\\Component\\HttpKernel\\RenderingStrategy\\DefaultRenderingStrategy',
'http_content_renderer.strategy.hinclude.class' => 'Symfony\\Component\\HttpKernel\\RenderingStrategy\\HIncludeRenderingStrategy',
'http_content_renderer.strategy.hinclude.global_template' => '',
'http_content_renderer.listener.router_proxy.class' => 'Symfony\\Component\\HttpKernel\\EventListener\\RouterProxyListener',
'translator.class' => 'Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator',
'translator.identity.class' => 'Symfony\\Component\\Translation\\IdentityTranslator',
'translator.selector.class' => 'Symfony\\Component\\Translation\\MessageSelector',
'translation.loader.php.class' => 'Symfony\\Component\\Translation\\Loader\\PhpFileLoader',
'translation.loader.yml.class' => 'Symfony\\Component\\Translation\\Loader\\YamlFileLoader',
'translation.loader.xliff.class' => 'Symfony\\Component\\Translation\\Loader\\XliffFileLoader',
'translation.loader.po.class' => 'Symfony\\Component\\Translation\\Loader\\PoFileLoader',
'translation.loader.mo.class' => 'Symfony\\Component\\Translation\\Loader\\MoFileLoader',
'translation.loader.qt.class' => 'Symfony\\Component\\Translation\\Loader\\QtFileLoader',
'translation.loader.csv.class' => 'Symfony\\Component\\Translation\\Loader\\CsvFileLoader',
'translation.loader.res.class' => 'Symfony\\Component\\Translation\\Loader\\IcuResFileLoader',
'translation.loader.dat.class' => 'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader',
'translation.loader.ini.class' => 'Symfony\\Component\\Translation\\Loader\\IniFileLoader',
'translation.dumper.php.class' => 'Symfony\\Component\\Translation\\Dumper\\PhpFileDumper',
'translation.dumper.xliff.class' => 'Symfony\\Component\\Translation\\Dumper\\XliffFileDumper',
'translation.dumper.po.class' => 'Symfony\\Component\\Translation\\Dumper\\PoFileDumper',
'translation.dumper.mo.class' => 'Symfony\\Component\\Translation\\Dumper\\MoFileDumper',
'translation.dumper.yml.class' => 'Symfony\\Component\\Translation\\Dumper\\YamlFileDumper',
'translation.dumper.qt.class' => 'Symfony\\Component\\Translation\\Dumper\\QtFileDumper',
'translation.dumper.csv.class' => 'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper',
'translation.dumper.ini.class' => 'Symfony\\Component\\Translation\\Dumper\\IniFileDumper',
'translation.dumper.res.class' => 'Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper',
'translation.extractor.php.class' => 'Symfony\\Bundle\\FrameworkBundle\\Translation\\PhpExtractor',
'translation.loader.class' => 'Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader',
'translation.extractor.class' => 'Symfony\\Component\\Translation\\Extractor\\ChainExtractor',
'translation.writer.class' => 'Symfony\\Component\\Translation\\Writer\\TranslationWriter',
'kernel.secret' => 'ThisTokenIsNotSoSecretChangeIt',
'kernel.trusted_proxies' => array(
),
'kernel.trust_proxy_headers' => false,
'kernel.default_locale' => 'ro',
'session.class' => 'Symfony\\Component\\HttpFoundation\\Session\\Session',
'session.flashbag.class' => 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag',
'session.attribute_bag.class' => 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag',
'session.storage.native.class' => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage',
'session.storage.mock_file.class' => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage',
'session.handler.native_file.class' => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler',
'session_listener.class' => 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener',
'session.storage.options' => array(
),
'session.save_path' => '/var/www/personal/symfony/app/cache/prod/sessions',
'form.resolved_type_factory.class' => 'Symfony\\Component\\Form\\ResolvedFormTypeFactory',
'form.registry.class' => 'Symfony\\Component\\Form\\FormRegistry',
'form.factory.class' => 'Symfony\\Component\\Form\\FormFactory',
'form.extension.class' => 'Symfony\\Component\\Form\\Extension\\DependencyInjection\\DependencyInjectionExtension',
'form.type_guesser.validator.class' => 'Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser',
'property_accessor.class' => 'Symfony\\Component\\PropertyAccess\\PropertyAccessor',
'form.csrf_provider.class' => 'Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\SessionCsrfProvider',
'form.type_extension.csrf.enabled' => true,
'form.type_extension.csrf.field_name' => '_token',
'validator.class' => 'Symfony\\Component\\Validator\\Validator',
'validator.mapping.class_metadata_factory.class' => 'Symfony\\Component\\Validator\\Mapping\\ClassMetadataFactory',
'validator.mapping.cache.apc.class' => 'Symfony\\Component\\Validator\\Mapping\\Cache\\ApcCache',
'validator.mapping.cache.prefix' => '',
'validator.mapping.loader.loader_chain.class' => 'Symfony\\Component\\Validator\\Mapping\\Loader\\LoaderChain',
'validator.mapping.loader.static_method_loader.class' => 'Symfony\\Component\\Validator\\Mapping\\Loader\\StaticMethodLoader',
'validator.mapping.loader.annotation_loader.class' => 'Symfony\\Component\\Validator\\Mapping\\Loader\\AnnotationLoader',
'validator.mapping.loader.xml_files_loader.class' => 'Symfony\\Component\\Validator\\Mapping\\Loader\\XmlFilesLoader',
'validator.mapping.loader.yaml_files_loader.class' => 'Symfony\\Component\\Validator\\Mapping\\Loader\\YamlFilesLoader',
'validator.validator_factory.class' => 'Symfony\\Bundle\\FrameworkBundle\\Validator\\ConstraintValidatorFactory',
'validator.mapping.loader.xml_files_loader.mapping_files' => array(
0 => '/var/www/personal/symfony/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/config/validation.xml',
),
'validator.mapping.loader.yaml_files_loader.mapping_files' => array(
0 => '/var/www/personal/symfony/src/Acme/DemoBundle/Resources/config/validation.yml',
),
'validator.translation_domain' => 'validators',
'router.class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\Router',
'router.request_context.class' => 'Symfony\\Component\\Routing\\RequestContext',
'routing.loader.class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader',
'routing.resolver.class' => 'Symfony\\Component\\Config\\Loader\\LoaderResolver',
'routing.loader.xml.class' => 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader',
'routing.loader.yml.class' => 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader',
'routing.loader.php.class' => 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader',
'router.options.generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
'router.options.generator_base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
'router.options.generator_dumper_class' => 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper',
'router.options.matcher_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher',
'router.options.matcher_base_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher',
'router.options.matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper',
'router.cache_warmer.class' => 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer',
'router.options.matcher.cache_class' => 'appprodUrlMatcher',
'router.options.generator.cache_class' => 'appprodUrlGenerator',
'router_listener.class' => 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener',
'router.request_context.host' => 'localhost',
'router.request_context.scheme' => 'http',
'router.request_context.base_url' => '',
'router.resource' => '/var/www/personal/symfony/app/config/routing.yml',
'request_listener.http_port' => 80,
'request_listener.https_port' => 443,
'templating.engine.delegating.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\DelegatingEngine',
'templating.name_parser.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateNameParser',
'templating.filename_parser.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateFilenameParser',
'templating.cache_warmer.template_paths.class' => 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TemplatePathsCacheWarmer',
'templating.locator.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator',
'templating.loader.filesystem.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader',
'templating.loader.cache.class' => 'Symfony\\Component\\Templating\\Loader\\CacheLoader',
'templating.loader.chain.class' => 'Symfony\\Component\\Templating\\Loader\\ChainLoader',
'templating.finder.class' => 'Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TemplateFinder',
'templating.engine.php.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\PhpEngine',
'templating.helper.slots.class' => 'Symfony\\Component\\Templating\\Helper\\SlotsHelper',
'templating.helper.assets.class' => 'Symfony\\Component\\Templating\\Helper\\CoreAssetsHelper',
'templating.helper.actions.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\ActionsHelper',
'templating.helper.router.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\RouterHelper',
'templating.helper.request.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\RequestHelper',
'templating.helper.session.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\SessionHelper',
'templating.helper.code.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\CodeHelper',
'templating.helper.translator.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\TranslatorHelper',
'templating.helper.form.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\FormHelper',
'templating.form.engine.class' => 'Symfony\\Component\\Form\\Extension\\Templating\\TemplatingRendererEngine',
'templating.form.renderer.class' => 'Symfony\\Component\\Form\\FormRenderer',
'templating.globals.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables',
'templating.asset.path_package.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Asset\\PathPackage',
'templating.asset.url_package.class' => 'Symfony\\Component\\Templating\\Asset\\UrlPackage',
'templating.asset.package_factory.class' => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Asset\\PackageFactory',
'templating.helper.code.file_link_format' => NULL,
'templating.helper.form.resources' => array(
0 => 'FrameworkBundle:Form',
),
'templating.hinclude.default_template' => NULL,
'templating.loader.cache.path' => NULL,
'templating.engines' => array(
0 => 'twig',
),
'annotations.reader.class' => 'Doctrine\\Common\\Annotations\\AnnotationReader',
'annotations.cached_reader.class' => 'Doctrine\\Common\\Annotations\\CachedReader',
'annotations.file_cache_reader.class' => 'Doctrine\\Common\\Annotations\\FileCacheReader',
'assetic.asset_factory.class' => 'Symfony\\Bundle\\AsseticBundle\\Factory\\AssetFactory',
'assetic.asset_manager.class' => 'Assetic\\Factory\\LazyAssetManager',
'assetic.asset_manager_cache_warmer.class' => 'Symfony\\Bundle\\AsseticBundle\\CacheWarmer\\AssetManagerCacheWarmer',
'assetic.cached_formula_loader.class' => 'Assetic\\Factory\\Loader\\CachedFormulaLoader',
'assetic.config_cache.class' => 'Assetic\\Cache\\ConfigCache',
'assetic.config_loader.class' => 'Symfony\\Bundle\\AsseticBundle\\Factory\\Loader\\ConfigurationLoader',
'assetic.config_resource.class' => 'Symfony\\Bundle\\AsseticBundle\\Factory\\Resource\\ConfigurationResource',
'assetic.coalescing_directory_resource.class' => 'Symfony\\Bundle\\AsseticBundle\\Factory\\Resource\\CoalescingDirectoryResource',
'assetic.directory_resource.class' => 'Symfony\\Bundle\\AsseticBundle\\Factory\\Resource\\DirectoryResource',
'assetic.filter_manager.class' => 'Symfony\\Bundle\\AsseticBundle\\FilterManager',
'assetic.worker.ensure_filter.class' => 'Assetic\\Factory\\Worker\\EnsureFilterWorker',
'assetic.value_supplier.class' => 'Symfony\\Bundle\\AsseticBundle\\DefaultValueSupplier',
'assetic.node.paths' => array(
),
'assetic.cache_dir' => '/var/www/personal/symfony/app/cache/prod/assetic',
'assetic.bundles' => array(
),
'assetic.twig_extension.class' => 'Symfony\\Bundle\\AsseticBundle\\Twig\\AsseticExtension',
'assetic.twig_formula_loader.class' => 'Assetic\\Extension\\Twig\\TwigFormulaLoader',
'assetic.helper.dynamic.class' => 'Symfony\\Bundle\\AsseticBundle\\Templating\\DynamicAsseticHelper',
'assetic.helper.static.class' => 'Symfony\\Bundle\\AsseticBundle\\Templating\\StaticAsseticHelper',
'assetic.php_formula_loader.class' => 'Symfony\\Bundle\\AsseticBundle\\Factory\\Loader\\AsseticHelperFormulaLoader',
'assetic.debug' => false,
'assetic.use_controller' => false,
'assetic.enable_profiler' => false,
'assetic.read_from' => '/var/www/personal/symfony/app/../web',
'assetic.write_to' => '/var/www/personal/symfony/app/../web',
'assetic.variables' => array(
),
'assetic.java.bin' => '/usr/bin/java',
'assetic.node.bin' => '/usr/bin/node',
'assetic.ruby.bin' => '/usr/bin/ruby',
'assetic.sass.bin' => '/usr/bin/sass',
'assetic.filter.cssrewrite.class' => 'Assetic\\Filter\\CssRewriteFilter',
'assetic.twig_extension.functions' => array(
),
'doctrine.dbal.logger.chain.class' => 'Doctrine\\DBAL\\Logging\\LoggerChain',
'doctrine.dbal.logger.profiling.class' => 'Doctrine\\DBAL\\Logging\\DebugStack',
'doctrine.dbal.logger.class' => 'Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger',
'doctrine.dbal.configuration.class' => 'Doctrine\\DBAL\\Configuration',
'doctrine.data_collector.class' => 'Doctrine\\Bundle\\DoctrineBundle\\DataCollector\\DoctrineDataCollector',
'doctrine.dbal.connection.event_manager.class' => 'Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager',
'doctrine.dbal.connection_factory.class' => 'Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory',
'doctrine.dbal.events.mysql_session_init.class' => 'Doctrine\\DBAL\\Event\\Listeners\\MysqlSessionInit',
'doctrine.dbal.events.oracle_session_init.class' => 'Doctrine\\DBAL\\Event\\Listeners\\OracleSessionInit',
'doctrine.class' => 'Doctrine\\Bundle\\DoctrineBundle\\Registry',
'doctrine.entity_managers' => array(
'default' => 'doctrine.orm.default_entity_manager',
),
'doctrine.default_entity_manager' => 'default',
'doctrine.dbal.connection_factory.types' => array(
),
'doctrine.connections' => array(
'default' => 'doctrine.dbal.default_connection',
),
'doctrine.default_connection' => 'default',
'doctrine.orm.configuration.class' => 'Doctrine\\ORM\\Configuration',
'doctrine.orm.entity_manager.class' => 'Doctrine\\ORM\\EntityManager',
'doctrine.orm.manager_configurator.class' => 'Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator',
'doctrine.orm.cache.array.class' => 'Doctrine\\Common\\Cache\\ArrayCache',
'doctrine.orm.cache.apc.class' => 'Doctrine\\Common\\Cache\\ApcCache',
'doctrine.orm.cache.memcache.class' => 'Doctrine\\Common\\Cache\\MemcacheCache',
'doctrine.orm.cache.memcache_host' => 'localhost',
'doctrine.orm.cache.memcache_port' => 11211,
'doctrine.orm.cache.memcache_instance.class' => 'Memcache',
'doctrine.orm.cache.memcached.class' => 'Doctrine\\Common\\Cache\\MemcachedCache',
'doctrine.orm.cache.memcached_host' => 'localhost',
'doctrine.orm.cache.memcached_port' => 11211,
'doctrine.orm.cache.memcached_instance.class' => 'Memcached',
'doctrine.orm.cache.redis.class' => 'Doctrine\\Common\\Cache\\RedisCache',
'doctrine.orm.cache.redis_host' => 'localhost',
'doctrine.orm.cache.redis_port' => 6379,
'doctrine.orm.cache.redis_instance.class' => 'Redis',
'doctrine.orm.cache.xcache.class' => 'Doctrine\\Common\\Cache\\XcacheCache',
'doctrine.orm.cache.wincache.class' => 'Doctrine\\Common\\Cache\\WinCacheCache',
'doctrine.orm.cache.zenddata.class' => 'Doctrine\\Common\\Cache\\ZendDataCache',
'doctrine.orm.metadata.driver_chain.class' => 'Doctrine\\ORM\\Mapping\\Driver\\DriverChain',
'doctrine.orm.metadata.annotation.class' => 'Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver',
'doctrine.orm.metadata.xml.class' => 'Doctrine\\ORM\\Mapping\\Driver\\SimplifiedXmlDriver',
'doctrine.orm.metadata.yml.class' => 'Doctrine\\ORM\\Mapping\\Driver\\SimplifiedYamlDriver',
'doctrine.orm.metadata.php.class' => 'Doctrine\\ORM\\Mapping\\Driver\\PHPDriver',
'doctrine.orm.metadata.staticphp.class' => 'Doctrine\\ORM\\Mapping\\Driver\\StaticPHPDriver',
'doctrine.orm.proxy_cache_warmer.class' => 'Symfony\\Bridge\\Doctrine\\CacheWarmer\\ProxyCacheWarmer',
'form.type_guesser.doctrine.class' => 'Symfony\\Bridge\\Doctrine\\Form\\DoctrineOrmTypeGuesser',
'doctrine.orm.validator.unique.class' => 'Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntityValidator',
'doctrine.orm.validator_initializer.class' => 'Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer',
'doctrine.orm.security.user.provider.class' => 'Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider',
'doctrine.orm.listeners.resolve_target_entity.class' => 'Doctrine\\ORM\\Tools\\ResolveTargetEntityListener',
'doctrine.orm.naming_strategy.default.class' => 'Doctrine\\ORM\\Mapping\\DefaultNamingStrategy',
'doctrine.orm.naming_strategy.underscore.class' => 'Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy',
'doctrine.orm.auto_generate_proxy_classes' => false,
'doctrine.orm.proxy_dir' => '/var/www/personal/symfony/app/cache/prod/doctrine/orm/Proxies',
'doctrine.orm.proxy_namespace' => 'Proxies',
'swiftmailer.class' => 'Swift_Mailer',
'swiftmailer.transport.sendmail.class' => 'Swift_Transport_SendmailTransport',
'swiftmailer.transport.mail.class' => 'Swift_Transport_MailTransport',
'swiftmailer.transport.failover.class' => 'Swift_Transport_FailoverTransport',
'swiftmailer.plugin.redirecting.class' => 'Swift_Plugins_RedirectingPlugin',
'swiftmailer.plugin.impersonate.class' => 'Swift_Plugins_ImpersonatePlugin',
'swiftmailer.plugin.messagelogger.class' => 'Swift_Plugins_MessageLogger',
'swiftmailer.plugin.antiflood.class' => 'Swift_Plugins_AntiFloodPlugin',
'swiftmailer.plugin.antiflood.threshold' => 99,
'swiftmailer.plugin.antiflood.sleep' => 0,
'swiftmailer.data_collector.class' => 'Symfony\\Bridge\\Swiftmailer\\DataCollector\\MessageDataCollector',
'swiftmailer.transport.smtp.class' => 'Swift_Transport_EsmtpTransport',
'swiftmailer.transport.smtp.encryption' => NULL,
'swiftmailer.transport.smtp.port' => 25,
'swiftmailer.transport.smtp.host' => '127.0.0.1',
'swiftmailer.transport.smtp.username' => NULL,
'swiftmailer.transport.smtp.password' => NULL,
'swiftmailer.transport.smtp.auth_mode' => NULL,
'swiftmailer.transport.smtp.timeout' => 30,
'swiftmailer.transport.smtp.source_ip' => NULL,
'swiftmailer.plugin.blackhole.class' => 'Swift_Plugins_BlackholePlugin',
'swiftmailer.spool.memory.class' => 'Swift_MemorySpool',
'swiftmailer.email_sender.listener.class' => 'Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener',
'swiftmailer.spool.memory.path' => '/var/www/personal/symfony/app/cache/prod/swiftmailer/spool',
'swiftmailer.spool.enabled' => true,
'swiftmailer.sender_address' => NULL,
'swiftmailer.single_address' => NULL,
'swiftmailer.delivery_whitelist' => array(
),
'monolog.logger.class' => 'Symfony\\Bridge\\Monolog\\Logger',
'monolog.gelf.publisher.class' => 'Gelf\\MessagePublisher',
'monolog.handler.stream.class' => 'Monolog\\Handler\\StreamHandler',
'monolog.handler.group.class' => 'Monolog\\Handler\\GroupHandler',
'monolog.handler.buffer.class' => 'Monolog\\Handler\\BufferHandler',
'monolog.handler.rotating_file.class' => 'Monolog\\Handler\\RotatingFileHandler',
'monolog.handler.syslog.class' => 'Monolog\\Handler\\SyslogHandler',
'monolog.handler.null.class' => 'Monolog\\Handler\\NullHandler',
'monolog.handler.test.class' => 'Monolog\\Handler\\TestHandler',
'monolog.handler.gelf.class' => 'Monolog\\Handler\\GelfHandler',
'monolog.handler.firephp.class' => 'Symfony\\Bridge\\Monolog\\Handler\\FirePHPHandler',
'monolog.handler.chromephp.class' => 'Symfony\\Bridge\\Monolog\\Handler\\ChromePhpHandler',
'monolog.handler.debug.class' => 'Symfony\\Bridge\\Monolog\\Handler\\DebugHandler',
'monolog.handler.swift_mailer.class' => 'Monolog\\Handler\\SwiftMailerHandler',
'monolog.handler.native_mailer.class' => 'Monolog\\Handler\\NativeMailerHandler',
'monolog.handler.socket.class' => 'Monolog\\Handler\\SocketHandler',
'monolog.handler.pushover.class' => 'Monolog\\Handler\\PushoverHandler',
'monolog.handler.fingers_crossed.class' => 'Monolog\\Handler\\FingersCrossedHandler',
'monolog.handler.fingers_crossed.error_level_activation_strategy.class' => 'Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy',
'monolog.handlers_to_channels' => array(
'monolog.handler.main' => NULL,
),
'twig.class' => 'Twig_Environment',
'twig.loader.filesystem.class' => 'Symfony\\Bundle\\TwigBundle\\Loader\\FilesystemLoader',
'twig.loader.chain.class' => 'Twig_Loader_Chain',
'templating.engine.twig.class' => 'Symfony\\Bundle\\TwigBundle\\TwigEngine',
'twig.cache_warmer.class' => 'Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheCacheWarmer',
'twig.extension.trans.class' => 'Symfony\\Bridge\\Twig\\Extension\\TranslationExtension',
'twig.extension.assets.class' => 'Symfony\\Bundle\\TwigBundle\\Extension\\AssetsExtension',
'twig.extension.actions.class' => 'Symfony\\Bundle\\TwigBundle\\Extension\\ActionsExtension',
'twig.extension.code.class' => 'Symfony\\Bridge\\Twig\\Extension\\CodeExtension',
'twig.extension.routing.class' => 'Symfony\\Bridge\\Twig\\Extension\\RoutingExtension',
'twig.extension.yaml.class' => 'Symfony\\Bridge\\Twig\\Extension\\YamlExtension',
'twig.extension.form.class' => 'Symfony\\Bridge\\Twig\\Extension\\FormExtension',
'twig.extension.httpkernel.class' => 'Symfony\\Bridge\\Twig\\Extension\\HttpKernelExtension',
'twig.form.engine.class' => 'Symfony\\Bridge\\Twig\\Form\\TwigRendererEngine',
'twig.form.renderer.class' => 'Symfony\\Bridge\\Twig\\Form\\TwigRenderer',
'twig.translation.extractor.class' => 'Symfony\\Bridge\\Twig\\Translation\\TwigExtractor',
'twig.exception_listener.class' => 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener',
'twig.controller.exception.class' => 'Symfony\\Bundle\\TwigBundle\\Controller\\ExceptionController',
'twig.exception_listener.controller' => 'twig.controller.exception:showAction',
'twig.form.resources' => array(
0 => 'form_div_layout.html.twig',
),
'twig.options' => array(
'debug' => false,
'strict_variables' => false,
'exception_controller' => 'twig.controller.exception:showAction',
'cache' => '/var/www/personal/symfony/app/cache/prod/twig',
'charset' => 'UTF-8',
'paths' => array(
),
),
'sensio_framework_extra.view.guesser.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\Templating\\TemplateGuesser',
'sensio_framework_extra.controller.listener.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener',
'sensio_framework_extra.routing.loader.annot_dir.class' => 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader',
'sensio_framework_extra.routing.loader.annot_file.class' => 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader',
'sensio_framework_extra.routing.loader.annot_class.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\Routing\\AnnotatedRouteControllerLoader',
'sensio_framework_extra.converter.listener.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener',
'sensio_framework_extra.converter.manager.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterManager',
'sensio_framework_extra.converter.doctrine.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DoctrineParamConverter',
'sensio_framework_extra.converter.datetime.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DateTimeParamConverter',
'sensio_framework_extra.view.listener.class' => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener',
'security.context.class' => 'Symfony\\Component\\Security\\Core\\SecurityContext',
'security.user_checker.class' => 'Symfony\\Component\\Security\\Core\\User\\UserChecker',
'security.encoder_factory.generic.class' => 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactory',
'security.encoder.digest.class' => 'Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder',
'security.encoder.plain.class' => 'Symfony\\Component\\Security\\Core\\Encoder\\PlaintextPasswordEncoder',
'security.encoder.pbkdf2.class' => 'Symfony\\Component\\Security\\Core\\Encoder\\Pbkdf2PasswordEncoder',
'security.user.provider.in_memory.class' => 'Symfony\\Component\\Security\\Core\\User\\InMemoryUserProvider',
'security.user.provider.in_memory.user.class' => 'Symfony\\Component\\Security\\Core\\User\\User',
'security.user.provider.chain.class' => 'Symfony\\Component\\Security\\Core\\User\\ChainUserProvider',
'security.authentication.trust_resolver.class' => 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolver',
'security.authentication.trust_resolver.anonymous_class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken',
'security.authentication.trust_resolver.rememberme_class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken',
'security.authentication.manager.class' => 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager',
'security.authentication.session_strategy.class' => 'Symfony\\Component\\Security\\Http\\Session\\SessionAuthenticationStrategy',
'security.access.decision_manager.class' => 'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManager',
'security.access.simple_role_voter.class' => 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleVoter',
'security.access.authenticated_voter.class' => 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AuthenticatedVoter',
'security.access.role_hierarchy_voter.class' => 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\RoleHierarchyVoter',
'security.firewall.class' => 'Symfony\\Component\\Security\\Http\\Firewall',
'security.firewall.map.class' => 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap',
'security.firewall.context.class' => 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext',
'security.matcher.class' => 'Symfony\\Component\\HttpFoundation\\RequestMatcher',
'security.role_hierarchy.class' => 'Symfony\\Component\\Security\\Core\\Role\\RoleHierarchy',
'security.http_utils.class' => 'Symfony\\Component\\Security\\Http\\HttpUtils',
'security.validator.user_password.class' => 'Symfony\\Component\\Security\\Core\\Validator\\Constraint\\UserPasswordValidator',
'security.authentication.retry_entry_point.class' => 'Symfony\\Component\\Security\\Http\\EntryPoint\\RetryAuthenticationEntryPoint',
'security.channel_listener.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\ChannelListener',
'security.authentication.form_entry_point.class' => 'Symfony\\Component\\Security\\Http\\EntryPoint\\FormAuthenticationEntryPoint',
'security.authentication.listener.form.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\UsernamePasswordFormAuthenticationListener',
'security.authentication.listener.basic.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\BasicAuthenticationListener',
'security.authentication.basic_entry_point.class' => 'Symfony\\Component\\Security\\Http\\EntryPoint\\BasicAuthenticationEntryPoint',
'security.authentication.listener.digest.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\DigestAuthenticationListener',
'security.authentication.digest_entry_point.class' => 'Symfony\\Component\\Security\\Http\\EntryPoint\\DigestAuthenticationEntryPoint',
'security.authentication.listener.x509.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\X509AuthenticationListener',
'security.authentication.listener.anonymous.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\AnonymousAuthenticationListener',
'security.authentication.switchuser_listener.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\SwitchUserListener',
'security.logout_listener.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\LogoutListener',
'security.logout.handler.session.class' => 'Symfony\\Component\\Security\\Http\\Logout\\SessionLogoutHandler',
'security.logout.handler.cookie_clearing.class' => 'Symfony\\Component\\Security\\Http\\Logout\\CookieClearingLogoutHandler',
'security.logout.success_handler.class' => 'Symfony\\Component\\Security\\Http\\Logout\\DefaultLogoutSuccessHandler',
'security.access_listener.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\AccessListener',
'security.access_map.class' => 'Symfony\\Component\\Security\\Http\\AccessMap',
'security.exception_listener.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\ExceptionListener',
'security.context_listener.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\ContextListener',
'security.authentication.provider.dao.class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\DaoAuthenticationProvider',
'security.authentication.provider.pre_authenticated.class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\PreAuthenticatedAuthenticationProvider',
'security.authentication.provider.anonymous.class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider',
'security.authentication.success_handler.class' => 'Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationSuccessHandler',
'security.authentication.failure_handler.class' => 'Symfony\\Component\\Security\\Http\\Authentication\\DefaultAuthenticationFailureHandler',
'security.authentication.provider.rememberme.class' => 'Symfony\\Component\\Security\\Core\\Authentication\\Provider\\RememberMeAuthenticationProvider',
'security.authentication.listener.rememberme.class' => 'Symfony\\Component\\Security\\Http\\Firewall\\RememberMeListener',
'security.rememberme.token.provider.in_memory.class' => 'Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\InMemoryTokenProvider',
'security.authentication.rememberme.services.persistent.class' => 'Symfony\\Component\\Security\\Http\\RememberMe\\PersistentTokenBasedRememberMeServices',
'security.authentication.rememberme.services.simplehash.class' => 'Symfony\\Component\\Security\\Http\\RememberMe\\TokenBasedRememberMeServices',
'security.rememberme.response_listener.class' => 'Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener',
'templating.helper.logout_url.class' => 'Symfony\\Bundle\\SecurityBundle\\Templating\\Helper\\LogoutUrlHelper',
'templating.helper.security.class' => 'Symfony\\Bundle\\SecurityBundle\\Templating\\Helper\\SecurityHelper',
'twig.extension.logout_url.class' => 'Symfony\\Bundle\\SecurityBundle\\Twig\\Extension\\LogoutUrlExtension',
'twig.extension.security.class' => 'Symfony\\Bridge\\Twig\\Extension\\SecurityExtension',
'data_collector.security.class' => 'Symfony\\Bundle\\SecurityBundle\\DataCollector\\SecurityDataCollector',
'security.access.denied_url' => NULL,
'security.authentication.manager.erase_credentials' => true,
'security.authentication.session_strategy.strategy' => 'migrate',
'security.access.always_authenticate_before_granting' => false,
'security.authentication.hide_user_not_found' => true,
'security.role_hierarchy.roles' => array(
'ROLE_ADMIN' => array(
0 => 'ROLE_USER',
),
'ROLE_SUPER_ADMIN' => array(
0 => 'ROLE_USER',
1 => 'ROLE_ADMIN',
2 => 'ROLE_ALLOWED_TO_SWITCH',
),
),
'jms_aop.cache_dir' => '/var/www/personal/symfony/app/cache/prod/jms_aop',
'jms_aop.interceptor_loader.class' => 'JMS\\AopBundle\\Aop\\InterceptorLoader',
'jms_di_extra.metadata.driver.annotation_driver.class' => 'JMS\\DiExtraBundle\\Metadata\\Driver\\AnnotationDriver',
'jms_di_extra.metadata.driver.configured_controller_injections.class' => 'JMS\\DiExtraBundle\\Metadata\\Driver\\ConfiguredControllerInjectionsDriver',
'jms_di_extra.metadata.driver.lazy_loading_driver.class' => 'Metadata\\Driver\\LazyLoadingDriver',
'jms_di_extra.metadata.metadata_factory.class' => 'Metadata\\MetadataFactory',
'jms_di_extra.metadata.cache.file_cache.class' => 'Metadata\\Cache\\FileCache',
'jms_di_extra.metadata.converter.class' => 'JMS\\DiExtraBundle\\Metadata\\MetadataConverter',
'jms_di_extra.controller_resolver.class' => 'JMS\\DiExtraBundle\\HttpKernel\\ControllerResolver',
'jms_di_extra.controller_injectors_warmer.class' => 'JMS\\DiExtraBundle\\HttpKernel\\ControllerInjectorsWarmer',
'jms_di_extra.all_bundles' => false,
'jms_di_extra.bundles' => array(
),
'jms_di_extra.directories' => array(
),
'jms_di_extra.cache_dir' => '/var/www/personal/symfony/app/cache/prod/jms_diextra',
'jms_di_extra.doctrine_integration' => true,
'jms_di_extra.cache_warmer.controller_file_blacklist' => array(
),
'jms_di_extra.doctrine_integration.entity_manager.file' => '/var/www/personal/symfony/app/cache/prod/jms_diextra/doctrine/EntityManager_50f3041e3ca28.php',
'jms_di_extra.doctrine_integration.entity_manager.class' => 'EntityManager50f3041e3ca28_546a8d27f194334ee012bfe64f629947b07e4919\\__CG__\\Doctrine\\ORM\\EntityManager',
'security.secured_services' => array(
),
'security.access.method_interceptor.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Interception\\MethodSecurityInterceptor',
'security.access.method_access_control' => array(
),
'security.access.remembering_access_decision_manager.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\RememberingAccessDecisionManager',
'security.access.run_as_manager.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\RunAsManager',
'security.authentication.provider.run_as.class' => 'JMS\\SecurityExtraBundle\\Security\\Authentication\\Provider\\RunAsAuthenticationProvider',
'security.run_as.key' => 'RunAsToken',
'security.run_as.role_prefix' => 'ROLE_',
'security.access.after_invocation_manager.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\AfterInvocation\\AfterInvocationManager',
'security.access.after_invocation.acl_provider.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\AfterInvocation\\AclAfterInvocationProvider',
'security.access.iddqd_voter.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Voter\\IddqdVoter',
'security.extra.metadata_factory.class' => 'Metadata\\MetadataFactory',
'security.extra.lazy_loading_driver.class' => 'Metadata\\Driver\\LazyLoadingDriver',
'security.extra.driver_chain.class' => 'Metadata\\Driver\\DriverChain',
'security.extra.annotation_driver.class' => 'JMS\\SecurityExtraBundle\\Metadata\\Driver\\AnnotationDriver',
'security.extra.file_cache.class' => 'Metadata\\Cache\\FileCache',
'security.access.secure_all_services' => false,
'security.extra.cache_dir' => '/var/www/personal/symfony/app/cache/prod/jms_security',
'security.acl.permission_evaluator.class' => 'JMS\\SecurityExtraBundle\\Security\\Acl\\Expression\\PermissionEvaluator',
'security.acl.has_permission_compiler.class' => 'JMS\\SecurityExtraBundle\\Security\\Acl\\Expression\\HasPermissionFunctionCompiler',
'security.expressions.voter.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Expression\\LazyLoadingExpressionVoter',
'security.expressions.handler.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Expression\\ContainerAwareExpressionHandler',
'security.expressions.compiler.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Expression\\ExpressionCompiler',
'security.expressions.expression.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Expression\\Expression',
'security.expressions.variable_compiler.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Expression\\Compiler\\ContainerAwareVariableCompiler',
'security.expressions.parameter_compiler.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Expression\\Compiler\\ParameterExpressionCompiler',
'security.expressions.reverse_interpreter.class' => 'JMS\\SecurityExtraBundle\\Security\\Authorization\\Expression\\ReverseInterpreter',
'security.extra.config_driver.class' => 'JMS\\SecurityExtraBundle\\Metadata\\Driver\\ConfigDriver',
'security.extra.twig_extension.class' => 'JMS\\SecurityExtraBundle\\Twig\\SecurityExtension',
'security.authenticated_voter.disabled' => false,
'security.role_voter.disabled' => false,
'security.acl_voter.disabled' => false,
'security.iddqd_aliases' => array(
),
);
$time_start = microtime(true);
for ($i=1; $i<=300; $i++) {
$a = isset($demo['security.access.remembering_access_decision_manager.class']);
}
echo 'isset: ' . (microtime(true) - $time_start);
echo PHP_EOL;
$time_start = microtime(true);
for ($i=1; $i<=300; $i++) {
$a = array_key_exists('security.access.remembering_access_decision_manager.class', $demo);
}
echo 'ake: ' . (microtime(true) - $time_start);
echo PHP_EOL;
$time_start = microtime(true);
for ($i=1; $i<=300; $i++) {
$a = isset($demo['security.access.remembering_access_decision_manager.class']) || array_key_exists('security.access.remembering_access_decision_manager.class', $demo);
}
echo 'isset + ake: ' . (microtime(true) - $time_start);
echo PHP_EOL;
php demo2.php
isset: 2.0980834960938E-5
ake: 9.1075897216797E-5
isset + ake: 1.8835067749023E-5
php demo2.php
isset: 2.1934509277344E-5
ake: 8.392333984375E-5
isset + ake: 1.8119812011719E-5
php demo2.php
isset: 2.0980834960938E-5
ake: 9.1075897216797E-5
isset + ake: 1.7166137695312E-5
php demo2.php
isset: 2.0980834960938E-5
ake: 9.0837478637695E-5
isset + ake: 1.8835067749023E-5
php demo2.php
isset: 2.0980834960938E-5
ake: 9.2029571533203E-5
isset + ake: 1.8119812011719E-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment