Predefined Constants

The constants below are always available as part of the PHP core.

CASE_LOWER (int)
CASE_LOWER is used with array_change_key_case() and is used to convert array keys to lower case. This is also the default case for array_change_key_case().
CASE_UPPER (int)
CASE_UPPER is used with array_change_key_case() and is used to convert array keys to upper case.

Sorting order flags:

SORT_ASC (int)
SORT_ASC is used with array_multisort() to sort in ascending order.
SORT_DESC (int)
SORT_DESC is used with array_multisort() to sort in descending order.

Sorting type flags: used by various sort functions

SORT_REGULAR (int)
SORT_REGULAR is used to compare items normally.
SORT_NUMERIC (int)
SORT_NUMERIC is used to compare items numerically.
SORT_STRING (int)
SORT_STRING is used to compare items as strings.
SORT_LOCALE_STRING (int)
SORT_LOCALE_STRING is used to compare items as strings, based on the current locale.
SORT_NATURAL (int)
SORT_NATURAL is used to compare items as strings using "natural ordering" like natsort().
SORT_FLAG_CASE (int)
SORT_FLAG_CASE can be combined (bitwise OR) with SORT_STRING or SORT_NATURAL to sort strings case-insensitively.

Filter flags:

ARRAY_FILTER_USE_KEY (int)
ARRAY_FILTER_USE_KEY is used with array_filter() to pass each key as the first argument to the given callback function.
ARRAY_FILTER_USE_BOTH (int)
ARRAY_FILTER_USE_BOTH is used with array_filter() to pass both value and key to the given callback function.

COUNT_NORMAL (int)
COUNT_RECURSIVE (int)
EXTR_OVERWRITE (int)
EXTR_SKIP (int)
EXTR_PREFIX_SAME (int)
EXTR_PREFIX_ALL (int)
EXTR_PREFIX_INVALID (int)
EXTR_PREFIX_IF_EXISTS (int)
EXTR_IF_EXISTS (int)
EXTR_REFS (int)

Here you can write a comment


Please enter at least 10 characters.
Loading... Please wait.
* Pflichtangabe
There are no comments available yet.

PHP cURL Tutorial: Using cURL to Make HTTP Requests

cURL is a powerful PHP extension that allows you to communicate with different servers using various protocols, including HTTP, HTTPS, FTP, and more. ...

TheMax

Autor : TheMax
Category: PHP-Tutorials

Midjourney Tutorial - Instructions for beginners

There is an informative video about Midjourney, the tool for creating digital images using artificial intelligence, entitled "Midjourney tutorial in German - instructions for beginners" ...

Mike94

Autor : Mike94
Category: KI Tutorials

Basics of views in MySQL

Views in a MySQL database offer the option of creating a virtual table based on the result of an SQL query. This virtual table can be queried like a normal table without changing the underlying data. ...

admin

Autor : admin
Category: mySQL-Tutorials

Publish a tutorial

Share your knowledge with other developers worldwide

Share your knowledge with other developers worldwide

You are a professional in your field and want to share your knowledge, then sign up now and share it with our PHP community

learn more

Publish a tutorial