Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks whether a constant with the given name exists
<?php defined(string $constant_name): bool
<?php         $file = $this->findFileWithExtension($class, '.php');




        if (false === $file && defined('HHVM_VERSION')) {

            $file = $this->findFileWithExtension($class, '.hh');

        }
<?php         if (null === $extraTypes) {

            $extraTypes = '';

            if (PHP_VERSION_ID >= 80100 || (defined('HHVM_VERSION') && version_compare(HHVM_VERSION, '3.3', '>='))) {

                $extraTypes .= '|enum';

            }
<?php         $io->write(sprintf('PHP version: <comment>%s</comment>', $phpVersion));



        if (defined('PHP_BINARY')) {

            $io->write(sprintf('PHP binary path: <comment>%s</comment>', PHP_BINARY));

        }
<?php             $io->write(sprintf('PHP binary path: <comment>%s</comment>', PHP_BINARY));

        }



        $io->write('OpenSSL version: ' . (defined('OPENSSL_VERSION_TEXT') ? '<comment>'.OPENSSL_VERSION_TEXT.'</comment>' : '<error>missing</error>'));

        $io->write('cURL version: ' . $this->getCurlVersion());



        $finder = new ExecutableFinder;
<?php             $warnings['openssl_version'] = true;

        }



        if (!defined('HHVM_VERSION') && !extension_loaded('apcu') && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) {

            $warnings['apc_cli'] = true;

        }
<?php             $warnings['xdebug_loaded'] = true;

        }



        if (defined('PHP_WINDOWS_VERSION_BUILD')

            && (version_compare(PHP_VERSION, '7.2.23', '<')

            || (version_compare(PHP_VERSION, '7.3.0', '>=')

            && version_compare(PHP_VERSION, '7.3.10', '<')))) {
<?php         $script = $input->getArgument('script');

        if (!in_array($script, $this->scriptEvents)) {

            if (defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) {

                throw new \InvalidArgumentException(sprintf('Script "%s" cannot be run with this command', $script));

            }

        }
<?php             if (false === $pubkeyid) {

                throw new \RuntimeException('Failed loading the public key from '.$sigFile);

            }

            $algo = defined('OPENSSL_ALGO_SHA384') ? OPENSSL_ALGO_SHA384 : 'SHA384';

            if (!in_array('sha384', array_map('strtolower', openssl_get_md_methods()))) {

                throw new \RuntimeException('SHA384 is not supported by your openssl extension, could not verify the phar file integrity');

            }
<?php         $this->disablePluginsByDefault = $input->hasParameterOption('--no-plugins');

        $this->disableScriptsByDefault = $input->hasParameterOption('--no-scripts');



        if (Platform::getEnv('COMPOSER_NO_INTERACTION') || !Platform::isTty(defined('STDIN') ? STDIN : fopen('php://stdin', 'r'))) {

            $input->setInteractive(false);

        }
<?php                 'Running %s (%s) with %s on %s',

                Composer::getVersion(),

                Composer::RELEASE_DATE,

                defined('HHVM_VERSION') ? 'HHVM '.HHVM_VERSION : 'PHP '.PHP_VERSION,

                function_exists('php_uname') ? php_uname('s') . ' / ' . php_uname('r') : 'Unknown OS'

            ), true, IOInterface::DEBUG);
<?php                 $io->writeError('<warning>Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug</warning>');

            }



            if (defined('COMPOSER_DEV_WARNING_TIME') && $commandName !== 'self-update' && $commandName !== 'selfupdate' && time() > COMPOSER_DEV_WARNING_TIME) {

                $io->writeError(sprintf('<warning>Warning: This development build of Composer is over 60 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF']));

            }
<?php             if (is_file($file) && Filesystem::isReadable($file) && is_array($composer = json_decode(file_get_contents($file), true))) {

                if (isset($composer['scripts']) && is_array($composer['scripts'])) {

                    foreach ($composer['scripts'] as $script => $dummy) {

                        if (!defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) {

                            if ($this->has($script)) {

                                $io->writeError('<warning>A script named '.$script.' would override a Composer command and has been skipped</warning>');

                            } else {
<?php                 $msg = "- Root composer.json requires ".$packageName.self::constraintToText($constraint).' but ';



                if (defined('HHVM_VERSION') || ($packageName === 'hhvm' && count($pool->whatProvides($packageName)) > 0)) {

                    return array($msg, 'your HHVM version does not satisfy that requirement.');

                }
<?php         }




        if (!defined('HHVM_VERSION')) {

            gc_enable();

        }
<?php             $installer = $this->getInstaller($package->getType());



            $event = 'Composer\Installer\PackageEvents::PRE_PACKAGE_'.strtoupper($opType);

            if (defined($event) && $runScripts && $this->eventDispatcher) {

                $this->eventDispatcher->dispatchPackageEvent(constant($event), $devMode, $repo, $allOperations, $operation);

            }