Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if a value exists in an array
<?php in_array(mixed $needle, array $haystack, bool $strict = false): bool
<?php         if (isset($params['driverClass'])) {

            $interfaces = class_implements($params['driverClass']);



            if ($interfaces === false || ! in_array(Driver::class, $interfaces, true)) {

                throw Exception::invalidDriverClass($params['driverClass']);

            }
<?php         assert(is_array($this->doctrineTypeComments));



        return in_array($doctrineType->getName(), $this->doctrineTypeComments, true);

    }
<?php                 $columnData['length'] = 255;

            }



            if (in_array($column->getName(), $options['primary'], true)) {

                $columnData['primary'] = true;

            }
<?php             foreach ($diff->fromTable->getPrimaryKeyColumns() as $columnName => $column) {


                if (! $column->getAutoincrement() || in_array($columnName, $changedIndex->getColumns(), true)) {

                    continue;

                }
<?php         $tableName = $diff->getName($this)->getQuotedName($this);



        foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) {

            if (in_array($foreignKey, $diff->changedForeignKeys, true)) {

                continue;

            }
<?php         }



        foreach ($this->getRemainingForeignKeyConstraintsRequiringRenamedIndexes($diff) as $foreignKey) {

            if (in_array($foreignKey, $diff->changedForeignKeys, true)) {

                continue;

            }
<?php         if (in_array(strtolower(trim($value)), $this->booleanLiterals['false'], true)) {

            return $callback(false);

        }
<?php             return $callback(false);

        }



        if (in_array(strtolower(trim($value)), $this->booleanLiterals['true'], true)) {

            return $callback(true);

        }
<?php     public function convertFromBoolean($item)

    {

        if ($item !== null && in_array(strtolower($item), $this->booleanLiterals['false'], true)) {

            return false;

        }
<?php     public function hasChanged($propertyName)

    {

        return in_array($propertyName, $this->changedProperties, true);

    }
<?php         $paths = $this->getSchemaSearchPaths();



        $this->existingSchemaPaths = array_filter($paths, static function ($v) use ($names): bool {

            return in_array($v, $names, true);

        });

    }
<?php         }



        if (

            (isset($this->_indexes[$indexName]) && ! in_array($indexName, $replacedImplicitIndexes, true)) ||

            ($this->_primaryKeyName !== null && $indexCandidate->isPrimary())

        ) {

            throw SchemaException::indexAlreadyExists($indexName, $this->_name);
<?php     private function filterColumns(array $columnNames, bool $reverse = false): array

    {

        return array_filter($this->_columns, static function (string $columnName) use ($columnNames, $reverse): bool {

            return in_array($columnName, $columnNames, true) !== $reverse;

        }, ARRAY_FILTER_USE_KEY);

    }
<?php             $primaryKey = $table->getPrimaryKey();



            if ($primaryKey !== null && in_array($column->getName(), $primaryKey->getColumns(), true)) {

                $label .= "\xe2\x9c\xb7";

            }
<?php             throw Exception::typeNotFound($name);

        }



        if (! in_array($this->findTypeName($type), [$name, null], true)) {

            throw Exception::typeAlreadyRegistered($type);

        }