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             $serializer = new ConstStub(self::SERIALIZERS[$serializer], $serializer);

        }



        $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0;

        if (\is_array($compression)) {

            foreach ($compression as &$v) {

                if (isset(self::COMPRESSION_MODES[$v])) {
<?php             $compression = new ConstStub(self::COMPRESSION_MODES[$compression], $compression);

        }



        $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0;

        if (\is_array($retry)) {

            foreach ($retry as &$v) {

                $v = new ConstStub($v ? 'RETRY' : 'NORETRY', $v);
<?php         }



        $options += [

            'TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0,

            'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT),

            'COMPRESSION' => $compression,

            'SERIALIZER' => $serializer,