[Go to site: main page, start]

You’re offline, but every Efiwe page you’ve loaded — including this one — is still available.

PHP Dictionary

A beginner-friendly PHP reference that clearly explains every PHP keyword, function, and constant — from arrays and strings to dates, files, regular expressions, and databases — with category filters for easy lookup and links to where each one appears in the PHP learning game.

Learn PHP
Keyword/FunctionBelongs ToDescription
$Regular Expression SyntaxMetacharacter. Finds a match at the end of the string
|Regular Expression SyntaxMetacharacter. Find a match for any one of the patterns separated by it, as in cat, dog or fish
.Regular Expression SyntaxMetacharacter. Find just one instance of any character
[0-9]Regular Expression SyntaxPattern. Find one character from the range 0 to 9
[^abc]Regular Expression SyntaxPattern. Find any character NOT between the brackets
[abc]Regular Expression SyntaxPattern. Find one character from the options between the brackets
\bRegular Expression SyntaxMetacharacter. Find a match at the beginning or the end of a word
\dRegular Expression SyntaxMetacharacter. Find a digit
\sRegular Expression SyntaxMetacharacter. Find a whitespace character
\uxxxxRegular Expression SyntaxMetacharacter. Find the Unicode character specified by the hexadecimal number xxxx
^Regular Expression SyntaxMetacharacter. Finds a match at the beginning of a string
__COMPILER_HALT_OFFSET__Miscellaneous ConstantsHolds the byte offset directly after the __halt_compiler() call in the file
__construct()SimpleXML FunctionsCreates a new SimpleXMLElement object

Introduced in:
PHP → Level 6 → Challenge 281

__halt_compiler()Miscellaneous FunctionsHalts the compiler execution
__toString()SimpleXML FunctionsReturns the string content of an element

Introduced in:
PHP → Level 7 → Challenge 339

abs()Math FunctionsReturns the absolute (positive) value of a number

Introduced in:
PHP → Level 6 → Challenge 268

abstractKeywordsDeclare a class as abstract

Introduced in:
PHP → Level 7 → Challenge 313

acos()Math FunctionsReturns the arc cosine of a number
acosh()Math FunctionsReturns the inverse hyperbolic cosine of a number
addAttribute()SimpleXML FunctionsAppends an attribute to the SimpleXML element
addChild()SimpleXML FunctionsAppends a child element to the SimpleXML element
addcslashes()String FunctionsReturns a string with backslashes in front of the specified characters
addslashes()String FunctionsReturns a string with backslashes in front of predefined characters
affected_rows()MySQLi FunctionsReturns the number of affected rows in the previous MySQL operation
andKeywordsA logical operator
array()Array FunctionsCreates an array

Introduced in:
PHP → Level 1 → Challenge 45

array_change_key_case()Array FunctionsChanges all keys in an array to lowercase or uppercase
array_chunk()Array FunctionsSplits an array into chunks of arrays

Introduced in:
PHP → Level 3 → Challenge 147

array_column()Array FunctionsReturns the values from a single column in the input array
array_combine()Array FunctionsCreates an array by using the elements from one "keys" array and one "values" array

Introduced in:
PHP → Level 3 → Challenge 139

array_count_values()Array FunctionsCounts all the values of an array
array_diff()Array FunctionsCompare arrays, and returns the differences (compare values only)
array_diff_assoc()Array FunctionsCompare arrays, and returns the differences (compare keys and values)
array_diff_key()Array FunctionsCompare arrays, and returns the differences (compare keys only)
array_diff_uassoc()Array FunctionsCompare arrays, and returns the differences (compare keys and values, using a user-defined key comparison function)
array_diff_ukey()Array FunctionsCompare arrays, and returns the differences (compare keys only, using a user-defined key comparison function)
array_fill()Array FunctionsFills an array with values

Introduced in:
PHP → Level 3 → Challenge 148

array_fill_keys()Array FunctionsFills an array with values, specifying keys
array_filter()Array FunctionsFilters the values of an array using a callback function

Introduced in:
PHP → Level 3 → Challenge 131

array_flip()Array FunctionsFlips/Exchanges all keys with their associated values in an array

Introduced in:
PHP → Level 3 → Challenge 146

array_intersect()Array FunctionsCompare arrays, and returns the matches (compare values only)
array_intersect_assoc()Array FunctionsCompare arrays and returns the matches (compare keys and values)
array_intersect_key()Array FunctionsCompare arrays, and returns the matches (compare keys only)
array_intersect_uassoc()Array FunctionsCompare arrays, and returns the matches (compare keys and values, using a user-defined key comparison function)
array_intersect_ukey()Array FunctionsCompare arrays, and returns the matches (compare keys only, using a user-defined key comparison function)
array_key_exists()Array FunctionsChecks if the specified key exists in the array

Introduced in:
PHP → Level 3 → Challenge 111

array_keys()Array FunctionsReturns all the keys of an array

Introduced in:
PHP → Level 3 → Challenge 110

array_map()Array FunctionsSends each value of an array to a user-made function, which returns new values

Introduced in:
PHP → Level 3 → Challenge 129

array_merge()Array FunctionsMerges one or more arrays into one array

Introduced in:
PHP → Level 3 → Challenge 135

array_merge_recursive()Array FunctionsMerges one or more arrays into one array recursively
array_multisort()Array FunctionsSorts multiple or multi-dimensional arrays
array_pad()Array FunctionsInserts a specified number of items, with a specified value, to an array
array_pop()Array FunctionsDeletes the last element of an array

Introduced in:
PHP → Level 3 → Challenge 145

array_product()Array FunctionsCalculates the product of the values in an array
array_push()Array FunctionsInserts one or more elements to the end of an array

Introduced in:
PHP → Level 2 → Challenge 99

array_rand()Array FunctionsReturns one or more random keys from an array
array_reduce()Array FunctionsReturns an array as a string, using a user-defined function

Introduced in:
PHP → Level 3 → Challenge 133

array_replace()Array FunctionsReplaces the values of the first array with the values from following arrays
array_replace_recursive()Array FunctionsReplaces the values of the first array with the values from following arrays recursively
array_reverse()Array FunctionsReturns an array in the reverse order

Introduced in:
PHP → Level 3 → Challenge 141

array_search()Array FunctionsSearches an array for a given value and returns the key

Introduced in:
PHP → Level 3 → Challenge 126

array_shift()Array FunctionsRemoves the first element from an array, and returns the value of the removed element

Introduced in:
PHP → Level 3 → Challenge 145

array_slice()Array FunctionsReturns selected parts of an array

Introduced in:
PHP → Level 3 → Challenge 137

array_splice()Array FunctionsRemoves and replaces specified elements of an array

Introduced in:
PHP → Level 3 → Challenge 138

array_sum()Array FunctionsReturns the sum of the values in an array

Introduced in:
PHP → Level 3 → Challenge 143

array_udiff()Array FunctionsCompare arrays, and returns the differences (compare values only, using a user-defined key comparison function)
array_udiff_assoc()Array FunctionsCompare arrays, and returns the differences (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)
array_udiff_uassoc()Array FunctionsCompare arrays, and returns the differences (compare keys and values, using two user-defined key comparison functions)
array_uintersect()Array FunctionsCompare arrays, and returns the matches (compare values only, using a user-defined key comparison function)
array_uintersect_assoc()Array FunctionsCompare arrays, and returns the matches (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)
array_uintersect_uassoc()Array FunctionsCompare arrays, and returns the matches (compare keys and values, using two user-defined key comparison functions)
array_unique()Array FunctionsRemoves duplicate values from an array

Introduced in:
PHP → Level 3 → Challenge 140

array_unshift()Array FunctionsAdds one or more elements to the beginning of an array

Introduced in:
PHP → Level 3 → Challenge 145

array_values()Array FunctionsReturns all the values of an array

Introduced in:
PHP → Level 3 → Challenge 110

array_walk()Array FunctionsApplies a user function to every member of an array
array_walk_recursive()Array FunctionsApplies a user function recursively to every member of an array
arsort()Array FunctionsSorts an associative array in descending order, according to the value

Introduced in:
PHP → Level 3 → Challenge 120

asKeywordsUsed in the foreach loop
asin()Math FunctionsReturns the arc sine of a number
asinh()Math FunctionsReturns the inverse hyperbolic sine of a number
asort()Array FunctionsSorts an associative array in ascending order, according to the value

Introduced in:
PHP → Level 3 → Challenge 119

asXML()SimpleXML FunctionsReturns a well-formed XML string from a SimpleXML object
atan()Math FunctionsReturns the arc tangent of a number in radians
atan2()Math FunctionsReturns the arc tangent of two variables x and y
atanh()Math FunctionsReturns the inverse hyperbolic tangent of a number
attributes()SimpleXML FunctionsReturns the attributes and values of an element
autocommit()MySQLi FunctionsTurns on or off auto-committing database modifications
base_convert()Math FunctionsConverts a number from one number base to another
basename()Filesystem FunctionsReturns the filename component of a path
begin_transaction()MySQLi FunctionsStarts a transaction
bin2hex()String FunctionsConverts a string of ASCII characters to hexadecimal values
bindec()Math FunctionsConverts a binary number to a decimal number
boolval()Variable Handling FunctionsReturns the boolean value of a variable
breakKeywordsBreak out of loops and switch statements

Introduced in:
PHP → Level 2 → Challenge 93

cal_days_in_month()Calendar FunctionsReturns the number of days in a month for a specified year and calendar

Introduced in:
PHP → Level 9 → Challenge 426

CAL_DOW_DAYNOCalendar ConstantsInteger constant requesting the day of week as a number (PHP 4)
CAL_DOW_LONGCalendar ConstantsInteger constant requesting the day of week as a full name (PHP 4)
CAL_DOW_SHORTCalendar ConstantsInteger constant requesting the day of week as a short name (PHP 4)
CAL_EASTER_ALWAYS_GREGORIANCalendar ConstantsInteger constant forcing the Gregorian Easter calculation (PHP 4.3)
CAL_EASTER_ALWAYS_JULIANCalendar ConstantsInteger constant forcing the Julian Easter calculation (PHP 4.3)
CAL_EASTER_DEFAULTCalendar ConstantsInteger constant selecting the default Easter calculation (PHP 4.3)
CAL_EASTER_ROMANCalendar ConstantsInteger constant selecting the Roman Easter calculation (PHP 4.3)
CAL_FRENCHCalendar ConstantsInteger constant identifying the French Republican calendar (PHP 4)
cal_from_jd()Calendar FunctionsConverts a Julian Day Count into a date of a specified calendar
CAL_GREGORIANCalendar ConstantsInteger constant identifying the Gregorian calendar (PHP 4)
cal_info()Calendar FunctionsReturns information about a specified calendar
CAL_JEWISHCalendar ConstantsInteger constant identifying the Jewish calendar (PHP 4)
CAL_JEWISH_ADD_ALAFIMCalendar ConstantsInteger constant adding alafim to Jewish dates (PHP 5.0)
CAL_JEWISH_ADD_ALAFIM_GERESHCalendar ConstantsInteger constant adding the alafim geresh to Jewish dates (PHP 5.0)
CAL_JEWISH_ADD_GERESHAYIMCalendar ConstantsInteger constant adding gereshayim to Jewish dates (PHP 5.0)
CAL_JULIANCalendar ConstantsInteger constant identifying the Julian calendar (PHP 4)
CAL_MONTH_FRENCHCalendar ConstantsInteger constant requesting French Republican month names (PHP 4)
CAL_MONTH_GREGORIAN_LONGCalendar ConstantsInteger constant requesting long Gregorian month names (PHP 4)
CAL_MONTH_GREGORIAN_SHORTCalendar ConstantsInteger constant requesting short Gregorian month names (PHP 4)
CAL_MONTH_JEWISHCalendar ConstantsInteger constant requesting Jewish month names (PHP 4)
CAL_MONTH_JULIAN_LONGCalendar ConstantsInteger constant requesting long Julian month names (PHP 4)
CAL_MONTH_JULIAN_SHORTCalendar ConstantsInteger constant requesting short Julian month names (PHP 4)
CAL_NUM_CALSCalendar ConstantsInteger constant holding the number of available calendars (PHP 4)
cal_to_jd()Calendar FunctionsConverts a date in a specified calendar to Julian Day Count
callableKeywordsA data type which can be executed as a function
caseKeywordsUsed in the switch conditional

Introduced in:
PHP → Level 2 → Challenge 65

catchKeywordsUsed in the try..catch statement

Introduced in:
PHP → Level 7 → Challenge 349

ceil()Math FunctionsRounds a number up to the nearest integer

Introduced in:
PHP → Level 6 → Challenge 265

change_user()MySQLi FunctionsChanges the user of the specified database connection
character_set_name()MySQLi FunctionsReturns the default character set for the database connection
chdir()Directory FunctionsChanges the current directory
checkdate()Date/Time FunctionsValidates a Gregorian date

Introduced in:
PHP → Level 9 → Challenge 427

checkdnsrr()Network FunctionsChecks DNS records for type corresponding to host
chgrp()Filesystem FunctionsChanges the file group
children()SimpleXML FunctionsReturns the children of a specified node
chmod()Filesystem FunctionsChanges the file mode
chop()String FunctionsAlias of rtrim()
chown()Filesystem FunctionsChanges the file owner
chr()String FunctionsReturns a character from a specified ASCII value

Introduced in:
PHP → Level 4 → Challenge 179

chroot()Directory FunctionsChanges the root directory
chunk_split()String FunctionsSplits a string into a series of smaller parts
classKeywordsDeclare a class

Introduced in:
PHP → Level 6 → Challenge 274

clearstatcache()Filesystem FunctionsClears the file status cache
cloneKeywordsCreate a copy of an object
close()MySQLi FunctionsCloses a previously opened database connection
closedir()Directory FunctionsCloses a directory handle
closelog()Network FunctionsCloses the connection of system logger
commit()MySQLi FunctionsCommits the current transaction
compact()Array FunctionsCreate array containing variables and their values
connect()MySQLi FunctionsOpens a new connection to the MySQL server
connect_errno()MySQLi FunctionsReturns the error code from the last connection error
connect_error()MySQLi FunctionsReturns the error description from the last connection error
CONNECTION_ABORTEDMiscellaneous ConstantsConnection is aborted by user or network error
connection_aborted()Miscellaneous FunctionsChecks whether the client has disconnected
CONNECTION_NORMALMiscellaneous ConstantsConnection is running normally
connection_status()Miscellaneous FunctionsReturns the current connection status
CONNECTION_TIMEOUTMiscellaneous ConstantsConnection timed out
connection_timeout()Miscellaneous FunctionsDeprecated from PHP 4.0.5. Checks whether the script has timed out
constKeywordsDefine a class constant

Introduced in:
PHP → Level 1 → Challenge 39

constant()Miscellaneous FunctionsReturns the value of a constant
continueKeywordsJump to the next iteration of a loop

Introduced in:
PHP → Level 2 → Challenge 94

convert_cyr_string()String FunctionsDeprecated. Converts a string from one Cyrillic character-set to another
convert_uudecode()String FunctionsDecodes a uuencoded string
convert_uuencode()String FunctionsEncodes a string using the uuencode algorithm
copy()Filesystem FunctionsCopies a file
cos()Math FunctionsReturns the cosine of a number
cosh()Math FunctionsReturns the hyperbolic cosine of a number
count()Array Functions / SimpleXML FunctionsReturns the number of elements in an array

Introduced in:
PHP → Level 3 → Challenge 142

count_chars()String FunctionsReturns information about characters used in a string
crc32()String FunctionsCalculates a 32-bit CRC for a string
crypt()String FunctionsOne-way string hashing
current()Array FunctionsReturns the current element in an array
data_seek()MySQLi FunctionsAdjusts the result pointer to an arbitrary row in the result-set
date()Date/Time FunctionsFormats a local date and time

Introduced in:
PHP → Level 5 → Challenge 250

date_add()Date/Time FunctionsAdds days, months, years, hours, minutes, and seconds to a date
DATE_ATOMDate/Time ConstantsAtom format (example: 2019-01-18T14:13:03+00:00)
DATE_COOKIEDate/Time ConstantsHTTP Cookies format (example: Fri, 18 Jan 2019 14:13:03 UTC)
date_create()Date/Time FunctionsReturns a new DateTime object
date_create_from_format()Date/Time FunctionsReturns a new DateTime object formatted according to a specified format
date_date_set()Date/Time FunctionsSets a new date
date_default_timezone_get()Date/Time FunctionsReturns the default timezone used by all date/time functions
date_default_timezone_set()Date/Time FunctionsSets the default timezone used by all date/time functions
date_diff()Date/Time FunctionsReturns the difference between two dates
date_format()Date/Time FunctionsReturns a date formatted according to a specified format
date_get_last_errors()Date/Time FunctionsReturns the warnings/errors found in a date string
date_interval_create_from_date_string()Date/Time FunctionsSets up a DateInterval from the relative parts of the string
date_interval_format()Date/Time FunctionsFormats the interval
DATE_ISO8601Date/Time ConstantsISO-8601 format (example: 2019-01-18T14:13:03+0000)
date_isodate_set()Date/Time FunctionsSets the ISO date
date_modify()Date/Time FunctionsModifies the timestamp
date_offset_get()Date/Time FunctionsReturns the timezone offset
date_parse()Date/Time FunctionsReturns an associative array with detailed info about a specified date
date_parse_from_format()Date/Time FunctionsReturns an associative array with detailed info about a specified date, according to a specified format
DATE_RFC1036Date/Time ConstantsRFC 1036 format (example: Friday, 18-Jan-19 14:13:03 +0000)
DATE_RFC1123Date/Time ConstantsRFC 1123 format (example: Fri, 18 Jan 2019 14:13:03 +0000)
DATE_RFC2822Date/Time ConstantsRFC 2822 format (example: Fri, 18 Jan 2019 14:13:03 +0000)
DATE_RFC3339Date/Time ConstantsSame as DATE_ATOM (since PHP 5.1.3)
DATE_RFC3339_EXTENDEDDate/Time ConstantsRFC3339 Extended format (since PHP 7.0.0)
DATE_RFC822Date/Time ConstantsRFC 822 format (example: Fri, 18 Jan 2019 14:13:03 +0000)
DATE_RFC850Date/Time ConstantsRFC 850 format (example: Friday, 18-Jan-19 14:13:03 UTC)
DATE_RSSDate/Time ConstantsRSS format (example: Fri, 18 Jan 2019 14:13:03 +0000)
date_sub()Date/Time FunctionsSubtracts days, months, years, hours, minutes, and seconds from a date
date_sun_info()Date/Time FunctionsReturns an array containing info about sunset/sunrise and twilight begin/end, for a specified day and location
date_sunrise()Date/Time FunctionsDeprecated. Returns the sunrise time for a specified day and location
date_sunset()Date/Time FunctionsDeprecated. Returns the sunset time for a specified day and location
date_time_set()Date/Time FunctionsSets the time
date_timestamp_get()Date/Time FunctionsReturns the Unix timestamp
date_timestamp_set()Date/Time FunctionsSets the date and time based on a Unix timestamp
date_timezone_get()Date/Time FunctionsReturns the time zone of the given DateTime object
date_timezone_set()Date/Time FunctionsSets the time zone for the DateTime object
DATE_W3CDate/Time ConstantsWorld Wide Web Consortium format (example: 2019-01-18T14:13:03+00:00)
debug()MySQLi FunctionsPerforms debugging operations
debug_backtrace()Error and Logging FunctionsGenerates a backtrace
debug_print_backtrace()Error and Logging FunctionsPrints a backtrace
debug_zval_dump()Variable Handling FunctionsDumps a string representation of an internal zend value to output
decbin()Math FunctionsConverts a decimal number to a binary number
dechex()Math FunctionsConverts a decimal number to a hexadecimal number
declareKeywordsSet directives for a block of code
decoct()Math FunctionsConverts a decimal number to an octal number
defaultKeywordsUsed in the switch statement

Introduced in:
PHP → Level 2 → Challenge 66

define()Miscellaneous FunctionsDefines a constant

Introduced in:
PHP → Level 1 → Challenge 38

defined()Miscellaneous FunctionsChecks whether a constant exists
deg2rad()Math FunctionsConverts a degree value to a radian value
delete()Filesystem FunctionsSee unlink()
die()Miscellaneous FunctionsAlias of exit()
dir()Directory FunctionsReturns an instance of the Directory class
dirname()Filesystem FunctionsReturns the directory name component of a path
disk_free_space()Filesystem FunctionsReturns the free space of a filesystem or disk
disk_total_space()Filesystem FunctionsReturns the total size of a filesystem or disk
diskfreespace()Filesystem FunctionsAlias of disk_free_space()
dns_check_record()Network FunctionsAlias of checkdnsrr()
dns_get_mx()Network FunctionsAlias of getmxrr()
dns_get_record()Network FunctionsGets the DNS resource records associated with the specified hostname
doKeywordsCreate a do...while loop

Introduced in:
PHP → Level 2 → Challenge 81

doubleval()Variable Handling FunctionsAlias of floatval()
dump_debug_info()MySQLi FunctionsDumps debugging info into the log
E_ALLError and Logging ConstantsEnable all PHP errors and warnings
E_COMPILE_ERRORError and Logging ConstantsFatal compile-time errors, generated by the Zend Scripting Engine
E_COMPILE_WARNINGError and Logging ConstantsNon-fatal compile-time errors, generated by the Zend Scripting Engine
E_CORE_ERRORError and Logging ConstantsFatal errors at PHP startup, generated by the core of PHP
E_CORE_WARNINGError and Logging ConstantsNon-fatal errors at PHP startup, generated by the core of PHP
E_DEPRECATEDError and Logging ConstantsRun-time notices about code that will not work in future versions (Since PHP 5.3)
E_ERRORError and Logging ConstantsFatal run-time errors. Errors that cannot be recovered from. Execution of the script is halted
E_NOTICEError and Logging ConstantsRun-time notices. The script found something that might be an error, but could also happen when running a script normally
E_PARSEError and Logging ConstantsCompile-time parse errors. Parse errors should only be generated by the parser
E_RECOVERABLE_ERRORError and Logging ConstantsCatchable fatal error. Indicates a probably dangerous error occurred, but the Engine was left in a stable state (Since PHP 5.2)
E_STRICTError and Logging ConstantsEnable to have PHP suggest changes to your code for best interoperability and forward compatibility
E_USER_DEPRECATEDError and Logging ConstantsUser-generated deprecation warning, raised in PHP code using trigger_error() (Since PHP 5.3)
E_USER_ERRORError and Logging ConstantsFatal user-generated error, raised in PHP code using trigger_error()
E_USER_NOTICEError and Logging ConstantsUser-generated notice, raised in PHP code using trigger_error()
E_USER_WARNINGError and Logging ConstantsNon-fatal user-generated warning, raised in PHP code using trigger_error()
E_WARNINGError and Logging ConstantsRun-time warnings (non-fatal errors). Execution of the script is not halted
each()Array FunctionsDeprecated from PHP 7.2. Returns the current key and value pair from an array
easter_date()Calendar FunctionsReturns the Unix timestamp for midnight on Easter of a specified year
easter_days()Calendar FunctionsReturns the number of days after March 21, that the Easter Day is in a specified year
echoKeywordsOutput text

Introduced in:
PHP → Level 1 → Challenge 1

echo()String FunctionsOutputs one or more strings

Introduced in:
PHP → Level 1 → Challenge 1

elseKeywordsUsed in conditional statements

Introduced in:
PHP → Level 2 → Challenge 55

elseifKeywordsUsed in conditional statements

Introduced in:
PHP → Level 2 → Challenge 56

emptyKeywordsCheck if an expression is empty

Introduced in:
PHP → Level 2 → Challenge 74

empty()Variable Handling FunctionsChecks whether a variable is empty

Introduced in:
PHP → Level 2 → Challenge 74

end()Array FunctionsSets the internal pointer of an array to its last element
enddeclareKeywordsEnd a declare block
endforKeywordsEnd a for block
endforeachKeywordsEnd a foreach block
endifKeywordsEnd an if or elseif block
endswitchKeywordsEnd a switch block
endwhileKeywordsEnd a while block
errno()MySQLi FunctionsReturns the last error code for the most recent function call
error()MySQLi FunctionsReturns the last error description for the most recent function call
error_clear_last()Error and Logging FunctionsClears the last error
error_get_last()Error and Logging FunctionsReturns the last error that occurred
error_list()MySQLi FunctionsReturns a list of errors for the most recent function call
error_log()Error and Logging FunctionsSends an error message to a log, to a file, or to a mail account
error_reporting()Error and Logging FunctionsSpecifies which errors are reported

Introduced in:
PHP → Level 8 → Challenge 362

eval()Miscellaneous FunctionsEvaluates a string as PHP code
Exception()Exception MethodsThe constructor of the Exception object

Introduced in:
PHP → Level 7 → Challenge 350

exit()Miscellaneous FunctionsPrints a message and exits the current script
exp()Math FunctionsCalculates the exponent of e
explode()String FunctionsBreaks a string into an array

Introduced in:
PHP → Level 4 → Challenge 158

expm1()Math FunctionsReturns exp(x) - 1
extendsKeywordsExtends a class or interface

Introduced in:
PHP → Level 7 → Challenge 304

extract()Array FunctionsImports variables into the current symbol table from an array
ezmlm_hash()Mail FunctionsDeprecated. Calculates the hash value needed by EZMLM
fclose()Filesystem FunctionsCloses an open file

Introduced in:
PHP → Level 8 → Challenge 386

feof()Filesystem FunctionsChecks if the "end-of-file" (EOF) has been reached for an open file
fetch_all()MySQLi FunctionsFetches all result rows as an associative array, a numeric array, or both
fetch_array()MySQLi FunctionsFetches a result row as an associative, a numeric array, or both
fetch_assoc()MySQLi FunctionsFetches a result row as an associative array
fetch_field()MySQLi FunctionsReturns the next field in the result-set, as an object
fetch_field_direct()MySQLi FunctionsReturns meta-data for a single field in the result-set, as an object
fetch_fields()MySQLi FunctionsReturns an array of objects that represent the fields in a result-set
fetch_lengths()MySQLi FunctionsReturns the lengths of the columns of the current row in the result-set
fetch_object()MySQLi FunctionsReturns the current row of a result-set, as an object
fetch_row()MySQLi FunctionsFetches one row from a result-set and returns it as an enumerated array
fflush()Filesystem FunctionsFlushes buffered output to an open file
fgetc()Filesystem FunctionsReturns a single character from an open file
fgetcsv()Filesystem FunctionsReturns a line from an open CSV file

Introduced in:
PHP → Level 8 → Challenge 393

fgets()Filesystem FunctionsReturns a line from an open file

Introduced in:
PHP → Level 8 → Challenge 387

fgetss()Filesystem FunctionsRemoved in PHP 8.0. Returns a line from an open file, stripped from HTML and PHP tags
field_count()MySQLi FunctionsReturns the number of columns for the most recent query
field_seek()MySQLi FunctionsSets the field cursor to the given field offset
file()Filesystem FunctionsReads a file into an array

Introduced in:
PHP → Level 8 → Challenge 385

file_exists()Filesystem FunctionsChecks whether or not a file or directory exists

Introduced in:
PHP → Level 8 → Challenge 381

file_get_contents()Filesystem FunctionsReads a file into a string

Introduced in:
PHP → Level 8 → Challenge 382

file_put_contents()Filesystem FunctionsWrites data to a file

Introduced in:
PHP → Level 8 → Challenge 383

fileatime()Filesystem FunctionsReturns the last access time of a file
filectime()Filesystem FunctionsReturns the last change time of a file
filegroup()Filesystem FunctionsReturns the group ID of a file
fileinode()Filesystem FunctionsReturns the inode number of a file
filemtime()Filesystem FunctionsReturns the last modification time of a file

Introduced in:
PHP → Level 8 → Challenge 389

fileowner()Filesystem FunctionsReturns the user ID (owner) of a file
fileperms()Filesystem FunctionsReturns the file's permissions
filesize()Filesystem FunctionsReturns the file size

Introduced in:
PHP → Level 8 → Challenge 389

filetype()Filesystem FunctionsReturns the file type
FILTER_CALLBACKFilter ConstantsCall a user-defined function to filter data
FILTER_DEFAULTFilter ConstantsDo nothing, optionally strip/encode special characters. Equivalent to FILTER_UNSAFE_RAW
FILTER_FLAG_ALLOW_FRACTIONFilter ConstantsAllows a period as a fractional separator in numbers
FILTER_FLAG_ALLOW_HEXFilter ConstantsOnly for inputs that start with 0x/0X as hexadecimal numbers. This only allows succeeding characters to be a-fA-F0-9
FILTER_FLAG_ALLOW_OCTALFilter ConstantsOnly for inputs that start with a zero as octal numbers. This only allows the succeeding digits to be 0-7
FILTER_FLAG_ALLOW_SCIENTIFICFilter ConstantsAllows an e or E for scientific notation in numbers
FILTER_FLAG_ALLOW_THOUSANDFilter ConstantsAllows a comma as a thousands separator in numbers
FILTER_FLAG_EMAIL_UNICODEFilter ConstantsAllows the local part of the email address to contain Unicode characters
FILTER_FLAG_EMPTY_STRING_NULLFilter ConstantsNot in use
FILTER_FLAG_ENCODE_AMPFilter ConstantsEncode the ampersand character
FILTER_FLAG_ENCODE_HIGHFilter ConstantsEncode characters with ASCII value greater than 127
FILTER_FLAG_ENCODE_LOWFilter ConstantsEncode characters with ASCII value lower than 32
FILTER_FLAG_IPV4Filter ConstantsAllows the IP address to be in IPv4 format
FILTER_FLAG_IPV6Filter ConstantsAllows the IP address to be in IPv6 format
FILTER_FLAG_NO_ENCODE_QUOTESFilter ConstantsDo not encode single and double quotes
FILTER_FLAG_NO_PRIV_RANGEFilter ConstantsFails validation for the private IPv4 and IPv6 address ranges
FILTER_FLAG_NO_RES_RANGEFilter ConstantsFails validation for the reserved IPv4 and IPv6 address ranges
FILTER_FLAG_NONEFilter ConstantsAllows no flags
FILTER_FLAG_PATH_REQUIREDFilter ConstantsThe URL must contain a path part
FILTER_FLAG_QUERY_REQUIREDFilter ConstantsThe URL must contain a query string
FILTER_FLAG_STRIP_HIGHFilter ConstantsStrip characters with ASCII value greater than 127
FILTER_FLAG_STRIP_LOWFilter ConstantsStrip characters with ASCII value lower than 32
FILTER_FORCE_ARRAYFilter ConstantsTreats a scalar value as array with the scalar value as only element
filter_has_var()Filter FunctionsChecks whether a variable of a specified input type exist
filter_id()Filter FunctionsReturns the filter ID of a specified filter name
filter_input()Filter FunctionsGets an external variable (e.g. from form input) and optionally filters it
filter_input_array()Filter FunctionsGets external variables (e.g. from form input) and optionally filters them
filter_list()Filter FunctionsReturns a list of all supported filter names
FILTER_NULL_ON_FAILUREFilter ConstantsReturn NULL on failure for unrecognized boolean values
FILTER_REQUIRE_ARRAYFilter ConstantsThe value must be an array
FILTER_REQUIRE_SCALARFilter ConstantsThe value must be a scalar
FILTER_SANITIZE_ADD_SLASHESFilter ConstantsAdded as a replacement for FILTER_SANITIZE_MAGIC_QUOTES
FILTER_SANITIZE_EMAILFilter ConstantsRemoves all illegal characters from an e-mail address
FILTER_SANITIZE_ENCODEDFilter ConstantsRemoves or encodes special characters
FILTER_SANITIZE_MAGIC_QUOTESFilter ConstantsApply addslashes(). Deprecated in PHP 7.3.0 and removed in PHP 8.0.0
FILTER_SANITIZE_NUMBER_FLOATFilter ConstantsRemove all characters, except digits, plus and minus signs, and optionally period, comma and e/E
FILTER_SANITIZE_NUMBER_INTFilter ConstantsRemoves all characters except digits and plus and minus signs
FILTER_SANITIZE_SPECIAL_CHARSFilter ConstantsRemoves special characters
FILTER_SANITIZE_STRINGFilter ConstantsRemoves tags and special characters from a string. Deprecated in PHP 8.1.0
FILTER_SANITIZE_STRIPPEDFilter ConstantsAlias of FILTER_SANITIZE_STRING. Deprecated in PHP 8.1.0
FILTER_SANITIZE_URLFilter ConstantsRemoves all illegal characters from a URL
FILTER_UNSAFE_RAWFilter ConstantsDo nothing, optionally strip/encode special characters
FILTER_VALIDATE_BOOLEANFilter ConstantsValidates a boolean
FILTER_VALIDATE_EMAILFilter ConstantsValidates value as a valid e-mail address
FILTER_VALIDATE_FLOATFilter ConstantsValidates value as float
FILTER_VALIDATE_INTFilter ConstantsValidates value as integer
FILTER_VALIDATE_IPFilter ConstantsValidates value as IP address
FILTER_VALIDATE_MACFilter ConstantsValidates value as MAC address
FILTER_VALIDATE_REGEXPFilter ConstantsValidates value against a regular expression

Introduced in:
PHP → Level 9 → Challenge 411

FILTER_VALIDATE_URLFilter ConstantsValidates value as URL
filter_var()Filter FunctionsFilters a variable with a specified filter

Introduced in:
PHP → Level 9 → Challenge 406

filter_var_array()Filter FunctionsGets multiple variables and filter them

Introduced in:
PHP → Level 9 → Challenge 410

finalKeywordsDeclare a class, property or method as final
finallyKeywordsUsed in the try...catch statement

Introduced in:
PHP → Level 8 → Challenge 352

floatval()Variable Handling FunctionsReturns the float value of a variable
flock()Filesystem FunctionsLocks or releases a file
floor()Math FunctionsRounds a number down to the nearest integer

Introduced in:
PHP → Level 6 → Challenge 265

flush()Output Control FunctionsAttempts to send content from the system's output buffer to the browser
fmod()Math FunctionsReturns the remainder of x/y
fnKeywordsDeclare an arrow function

Introduced in:
PHP → Level 5 → Challenge 201

fnmatch()Filesystem FunctionsMatches a filename or string against a specified pattern
fopen()Filesystem FunctionsOpens a file or URL

Introduced in:
PHP → Level 8 → Challenge 386

forKeywordsCreate a for loop
foreachKeywordsCreate a foreach loop

Introduced in:
PHP → Level 1 → Challenge 48

fpassthru()Filesystem FunctionsReads from the current position in a file until EOF, and writes the result to the output buffer
fprintf()String FunctionsWrites a formatted string to a specified output stream
fputcsv()Filesystem FunctionsFormats a line as CSV and writes it to an open file
fputs()Filesystem FunctionsAlias of fwrite()
fread()Filesystem FunctionsReads from an open file (binary-safe)

Introduced in:
PHP → Level 8 → Challenge 387

frenchtojd()Calendar FunctionsConverts a French Republican date to a Julian Day Count
fscanf()Filesystem FunctionsParses input from an open file according to a specified format
fseek()Filesystem FunctionsSeeks in an open file
fsockopen()Network FunctionsOpens an Internet or Unix domain socket connection
fstat()Filesystem FunctionsReturns information about an open file
ftell()Filesystem FunctionsReturns the current position in an open file
ftp_alloc()FTP FunctionsAllocates space for a file to be uploaded to the FTP server
FTP_ASCIIFTP ConstantsInteger constant selecting ASCII transfer mode
FTP_AUTORESUMEFTP ConstantsInteger constant that automatically resumes an interrupted transfer
FTP_AUTOSEEKFTP ConstantsInteger constant controlling automatic seeking during transfers
FTP_BINARYFTP ConstantsInteger constant selecting binary transfer mode
ftp_cdup()FTP FunctionsChanges to the parent directory on the FTP server
ftp_chdir()FTP FunctionsChanges the current directory on the FTP server
ftp_chmod()FTP FunctionsSets permissions on a file via FTP
ftp_close()FTP FunctionsCloses an FTP connection
ftp_connect()FTP FunctionsOpens an FTP connection
ftp_delete()FTP FunctionsDeletes a file on the FTP server
ftp_exec()FTP FunctionsExecutes a command on the FTP server
FTP_FAILEDFTP ConstantsAsynchronous transfer has failed
ftp_fget()FTP FunctionsDownloads a file from the FTP server and saves it into an open local file
FTP_FINISHEDFTP ConstantsAsynchronous transfer is completed
ftp_fput()FTP FunctionsUploads from an open file and saves it to a file on the FTP server
ftp_get()FTP FunctionsDownloads a file from the FTP server
ftp_get_option()FTP FunctionsReturns runtime options of the FTP connection
FTP_IMAGEFTP ConstantsAlias of FTP_BINARY
ftp_login()FTP FunctionsLogs in to the FTP connection
ftp_mdtm()FTP FunctionsReturns the last modified time of a specified file
ftp_mkdir()FTP FunctionsCreates a new directory on the FTP server
ftp_mlsd()FTP FunctionsReturns the list of files in the specified directory
FTP_MOREDATAFTP ConstantsAsynchronous transfer is in progress
ftp_nb_continue()FTP FunctionsContinues retrieving or sending a file (non-blocking)
ftp_nb_fget()FTP FunctionsDownloads a file from the FTP server and saves it into an open file (non-blocking)
ftp_nb_fput()FTP FunctionsUploads from an open file and saves it to a file on the FTP server (non-blocking)
ftp_nb_get()FTP FunctionsDownloads a file from the FTP server (non-blocking)
ftp_nb_put()FTP FunctionsUploads a file to the FTP server (non-blocking)
ftp_nlist()FTP FunctionsReturns a list of files in the specified directory on the FTP server
ftp_pasv()FTP FunctionsTurns passive mode on or off
ftp_put()FTP FunctionsUploads a file to the FTP server
ftp_pwd()FTP FunctionsReturns the current directory name
ftp_quit()FTP FunctionsAlias of ftp_close()
ftp_raw()FTP FunctionsSends a raw command to the FTP server
ftp_rawlist()FTP FunctionsReturns a list of files with file information from a specified directory
ftp_rename()FTP FunctionsRenames a file or directory on the FTP server
ftp_rmdir()FTP FunctionsDeletes an empty directory on the FTP server
ftp_set_option()FTP FunctionsSets runtime options for the FTP connection
ftp_site()FTP FunctionsSends an FTP SITE command to the FTP server
ftp_size()FTP FunctionsReturns the size of the specified file
ftp_ssl_connect()FTP FunctionsOpens a secure SSL-FTP connection
ftp_systype()FTP FunctionsReturns the system type identifier of the FTP server
FTP_TEXTFTP ConstantsAlias of FTP_ASCII
FTP_TIMEOUT_SECFTP ConstantsThe timeout used for network operations
FTP_USEPASVADDRESSFTP ConstantsBoolean constant controlling whether the address returned by the server in passive mode is used
ftruncate()Filesystem FunctionsTruncates an open file to a specified length
functionKeywordsCreate a function

Introduced in:
PHP → Level 4 → Challenge 187

fwrite()Filesystem FunctionsWrites to an open file (binary-safe)

Introduced in:
PHP → Level 8 → Challenge 388

get_browser()Miscellaneous FunctionsReturns the capabilities of the user's browser
get_charset()MySQLi FunctionsReturns a character set object
get_client_info()MySQLi FunctionsReturns the MySQL client library version
get_client_stats()MySQLi FunctionsReturns statistics about client per-process
get_client_version()MySQLi FunctionsReturns the MySQL client library version as an integer
get_connection_stats()MySQLi FunctionsReturns statistics about the client connection
get_defined_vars()Variable Handling FunctionsReturns all defined variables, as an array
get_host_info()MySQLi FunctionsReturns the MySQL server hostname and the connection type
get_html_translation_table()String FunctionsReturns the translation table used by htmlspecialchars() and htmlentities()
get_proto_info()MySQLi FunctionsReturns the MySQL protocol version
get_resource_type()Variable Handling FunctionsReturns the type of a resource
get_server_info()MySQLi FunctionsReturns the MySQL server version
get_server_version()MySQLi FunctionsReturns the MySQL server version as an integer
getChildren()SimpleXML FunctionsIteration. Returns the child elements of the current element
getCode()Exception MethodsReturns the exception code

Introduced in:
PHP → Level 8 → Challenge 358

getcwd()Directory FunctionsReturns the current working directory

Introduced in:
PHP → Level 9 → Challenge 428

getdate()Date/Time FunctionsReturns date/time information of a timestamp or the current local date/time
getDocNamespaces()SimpleXML FunctionsReturns the namespaces declared in document
getFile()Exception MethodsReturns the full path of the file in which the exception was thrown
gethostbyaddr()Network FunctionsReturns the domain name for a given IP address
gethostbyname()Network FunctionsReturns the IPv4 address for a given domain or host name
gethostbynamel()Network FunctionsReturns a list of IPv4 addresses for a given domain or host name
gethostname()Network FunctionsReturns the host name

Introduced in:
PHP → Level 9 → Challenge 430

getLine()Exception MethodsReturns the line number of the line of code which threw the exception
getMessage()Exception MethodsReturns a string describing why the exception was thrown

Introduced in:
PHP → Level 8 → Challenge 351

getmxrr()Network FunctionsReturns the MX records for the specified internet host name
getName()SimpleXML FunctionsReturns the name of an element

Introduced in:
PHP → Level 6 → Challenge 292

getNamespaces()SimpleXML FunctionsReturns the namespaces used in document
getPrevious()Exception MethodsIf this exception was triggered by another one, this method returns the previous exception. If not, it returns null

Introduced in:
PHP → Level 8 → Challenge 359

getprotobyname()Network FunctionsReturns the protocol number for a given protocol name
getprotobynumber()Network FunctionsReturns the protocol name for a given protocol number
getrandmax()Math FunctionsReturns the largest possible value returned by rand()
getservbyname()Network FunctionsReturns the port number for a given Internet service and protocol
getservbyport()Network FunctionsReturns the Internet service for a given port and protocol
gettimeofday()Date/Time FunctionsReturns the current time
getTrace()Exception MethodsReturns an array with information about all of the functions that were running at the time the exception was thrown
getTraceAsString()Exception MethodsReturns the same information as getTrace(), but in a string
gettype()Variable Handling FunctionsReturns the type of a variable

Introduced in:
PHP → Level 1 → Challenge 13

glob()Filesystem FunctionsReturns an array of filenames / directories matching a specified pattern

Introduced in:
PHP → Level 9 → Challenge 429

globalKeywordsImport variables from the global scope

Introduced in:
PHP → Level 4 → Challenge 195

gmdate()Date/Time FunctionsFormats a GMT/UTC date and time
gmmktime()Date/Time FunctionsReturns the Unix timestamp for a GMT date
gmstrftime()Date/Time FunctionsDeprecated. Formats a GMT/UTC date and time according to locale settings
gotoKeywordsJump to a line of code
gregoriantojd()Calendar FunctionsConverts a Gregorian date to a Julian Day Count
hasChildren()SimpleXML FunctionsIteration. Checks whether the current element has children
header()Network FunctionsSends a raw HTTP header to a client
header_register_callback()Network FunctionsCalls a header function
header_remove()Network FunctionsRemoves an HTTP header previously set with the header() function
headers_list()Network FunctionsReturns a list of response headers to be sent to the browser
headers_sent()Network FunctionsChecks if and where headers have been sent
hebrev()String FunctionsConverts Hebrew text to visual text
hebrevc()String FunctionsDeprecated. Converts Hebrew text to visual text and new lines into line breaks
hex2bin()String FunctionsConverts a string of hexadecimal values to ASCII characters
hexdec()Math FunctionsConverts a hexadecimal number to a decimal number
highlight_file()Miscellaneous FunctionsOutputs a file with the PHP syntax highlighted
highlight_string()Miscellaneous FunctionsOutputs a string with the PHP syntax highlighted
hrtime()Miscellaneous FunctionsReturns the system's high resolution time
html_entity_decode()String FunctionsConverts HTML entities to characters
htmlentities()String FunctionsConverts characters to HTML entities
htmlspecialchars()String FunctionsConverts some predefined characters to HTML entities

Introduced in:
PHP → Level 5 → Challenge 230

htmlspecialchars_decode()String FunctionsConverts some predefined HTML entities to characters
http_response_code()Network FunctionsSets or returns the HTTP response status code
hypot()Math FunctionsCalculates the hypotenuse of a right-angle triangle
iRegular Expression SyntaxModifier. Performs a case-insensitive search

Introduced in:
PHP → Level 5 → Challenge 241

idate()Date/Time FunctionsFormats a local time/date as integer
ifKeywordsCreate a conditional statement

Introduced in:
PHP → Level 2 → Challenge 54

ignore_user_abort()Miscellaneous FunctionsSets whether a remote client can abort the running of a script
implementsKeywordsImplement an interface
implode()String FunctionsReturns a string from the elements of an array

Introduced in:
PHP → Level 4 → Challenge 159

in_array()Array FunctionsChecks if a specified value exists in an array

Introduced in:
PHP → Level 3 → Challenge 125

includeKeywordsEmbed code from another file
include_onceKeywordsEmbed code from another file
inet_ntop()Network FunctionsConverts a 32bit IPv4 or 128bit IPv6 address into a readable format
inet_pton()Network FunctionsConverts a readable IP address into a packed 32bit IPv4 or 128bit IPv6 format
INFMath ConstantsThe infinite
info()MySQLi FunctionsReturns information about the last executed query
init()MySQLi FunctionsInitializes MySQLi and returns a resource for use with real_connect()
INPUT_COOKIEFilter ConstantsCOOKIE variables
INPUT_ENVFilter ConstantsENV variables
INPUT_GETFilter ConstantsGET variables
INPUT_POSTFilter ConstantsPOST variables
INPUT_SERVERFilter ConstantsSERVER variables
insert_id()MySQLi FunctionsReturns the auto-generated id from the last query
instanceofKeywordsTest an object's class

Introduced in:
PHP → Level 7 → Challenge 321

insteadofKeywordsResolve conflicts with traits

Introduced in:
PHP → Level 7 → Challenge 337

intdiv()Math FunctionsPerforms integer division

Introduced in:
PHP → Level 1 → Challenge 31

interfaceKeywordsDeclare an interface

Introduced in:
PHP → Level 7 → Challenge 311

intval()Variable Handling FunctionsReturns the integer value of a variable
ip2long()Network FunctionsConverts an IPv4 address into a long integer
is_array()Variable Handling FunctionsChecks whether a variable is an array

Introduced in:
PHP → Level 9 → Challenge 405

is_bool()Variable Handling FunctionsChecks whether a variable is a boolean

Introduced in:
PHP → Level 1 → Challenge 42

is_callable()Variable Handling FunctionsChecks whether the contents of a variable can be called as a function

Introduced in:
PHP → Level 9 → Challenge 402

is_countable()Variable Handling FunctionsChecks whether the contents of a variable is a countable value
is_dir()Filesystem FunctionsChecks whether a file is a directory
is_double()Variable Handling FunctionsAlias of is_float()
is_executable()Filesystem FunctionsChecks whether a file is executable
is_file()Filesystem FunctionsChecks whether a file is a regular file
is_finite()Math FunctionsChecks whether a value is finite or not
is_float()Variable Handling FunctionsChecks whether a variable is of type float
is_infinite()Math FunctionsChecks whether a value is infinite or not
is_int()Variable Handling FunctionsChecks whether a variable is of type integer

Introduced in:
PHP → Level 1 → Challenge 42

is_integer()Variable Handling FunctionsAlias of is_int()
is_iterable()Variable Handling FunctionsChecks whether the contents of a variable is an iterable value

Introduced in:
PHP → Level 9 → Challenge 402

is_link()Filesystem FunctionsChecks whether a file is a link
is_long()Variable Handling FunctionsAlias of is_int()
is_nan()Math FunctionsChecks whether a value is 'not-a-number'
is_null()Variable Handling FunctionsChecks whether a variable is NULL

Introduced in:
PHP → Level 1 → Challenge 18

is_numeric()Variable Handling FunctionsChecks whether a variable is a number or a numeric string

Introduced in:
PHP → Level 3 → Challenge 104

is_object()Variable Handling FunctionsChecks whether a variable is an object

Introduced in:
PHP → Level 9 → Challenge 405

is_readable()Filesystem FunctionsChecks whether a file is readable
is_real()Variable Handling FunctionsAlias of is_float()
is_resource()Variable Handling FunctionsChecks whether a variable is a resource
is_scalar()Variable Handling FunctionsChecks whether a variable is a scalar
is_string()Variable Handling FunctionsChecks whether a variable is of type string

Introduced in:
PHP → Level 1 → Challenge 42

is_uploaded_file()Filesystem FunctionsChecks whether a file was uploaded via HTTP POST
is_writable()Filesystem FunctionsChecks whether a file is writable
is_writeable()Filesystem FunctionsAlias of is_writable()
issetKeywordsCheck if a variable exists and is not null

Introduced in:
PHP → Level 2 → Challenge 74

isset()Variable Handling FunctionsChecks whether a variable is set (declared and not NULL)

Introduced in:
PHP → Level 2 → Challenge 74

jddayofweek()Calendar FunctionsReturns the day of the week
jdmonthname()Calendar FunctionsReturns a month name
jdtofrench()Calendar FunctionsConverts a Julian Day Count to a French Republican date
jdtogregorian()Calendar FunctionsConverts a Julian Day Count to a Gregorian date
jdtojewish()Calendar FunctionsConverts a Julian Day Count to a Jewish date
jdtojulian()Calendar FunctionsConverts a Julian Day Count to a Julian date
jdtounix()Calendar FunctionsConverts Julian Day Count to Unix timestamp
jewishtojd()Calendar FunctionsConverts a Jewish date to a Julian Day Count
join()String FunctionsAlias of implode()
JSON_BIGINT_AS_STRINGJSON ConstantsDecodes large integers as strings instead of floats
json_decode()JSON FunctionsDecodes a JSON string

Introduced in:
PHP → Level 8 → Challenge 370

json_encode()JSON FunctionsEncode a value to JSON format

Introduced in:
PHP → Level 8 → Challenge 369

JSON_ERROR_CTRL_CHARJSON ConstantsControl character error
JSON_ERROR_DEPTHJSON ConstantsMaximum stack depth has been exceeded
JSON_ERROR_INF_OR_NANJSON ConstantsInvalid NAN or INF values
JSON_ERROR_INVALID_PROPERTY_NAMEJSON ConstantsInvalid property name
JSON_ERROR_NONEJSON ConstantsNo error has occurred
JSON_ERROR_RECURSIONJSON ConstantsInvalid recursive reference values
JSON_ERROR_STATE_MISMATCHJSON ConstantsInvalid or malformed JSON
JSON_ERROR_SYNTAXJSON ConstantsSyntax error
JSON_ERROR_UNSUPPORTED_TYPEJSON ConstantsInvalid type
JSON_ERROR_UTF16JSON ConstantsMalformed UTF-16 characters
JSON_ERROR_UTF8JSON ConstantsMalformed UTF-8 characters
JSON_FORCE_OBJECTJSON ConstantsOutputs an object rather than an array when a non-associative array is used
JSON_HEX_AMPJSON ConstantsAll ampersands are converted to their escaped Unicode form
JSON_HEX_APOSJSON ConstantsAll single quotes are converted to their escaped Unicode form
JSON_HEX_QUOTJSON ConstantsAll double quotes are converted to their escaped Unicode form
JSON_HEX_TAGJSON ConstantsAll angle brackets are converted to their escaped Unicode form
JSON_INVALID_UTF8_IGNOREJSON ConstantsIgnore invalid UTF-8 characters
JSON_INVALID_UTF8_SUBSTITUTEJSON ConstantsConvert invalid UTF-8 characters to the replacement character
json_last_error()JSON FunctionsReturns the last error occurred

Introduced in:
PHP → Level 8 → Challenge 374

json_last_error_msg()JSON FunctionsReturns the error string of the last json_encode() or json_decode() call
JSON_NUMERIC_CHECKJSON ConstantsEncodes numeric strings as numbers
JSON_OBJECT_AS_ARRAYJSON ConstantsDecodes JSON objects as PHP arrays
JSON_PARTIAL_OUTPUT_ON_ERRORJSON ConstantsSubstitute some unencodable values instead of failing
JSON_PRESERVE_ZERO_FRACTIONJSON ConstantsEnsures that float values are always encoded as a float value
JSON_PRETTY_PRINTJSON ConstantsUse whitespace in returned data to format it
JSON_THROWN_ON_ERRORJSON ConstantsThrows a JsonException instead of setting the global error state
JSON_UNESCAPED_LINE_TERMINATORSJSON ConstantsLine terminators are kept unescaped
JSON_UNESCAPED_SLASHESJSON ConstantsDo not escape forward slashes
json_validate()JSON FunctionsChecks if a string contains valid JSON (PHP 8.3)
juliantojd()Calendar FunctionsConverts a Julian date to a Julian Day Count
key()Array FunctionsFetches a key from an array
kill()MySQLi FunctionsAsks the server to kill a MySQL thread
krsort()Array FunctionsSorts an associative array in descending order, according to the key

Introduced in:
PHP → Level 3 → Challenge 122

ksort()Array FunctionsSorts an associative array in ascending order, according to the key

Introduced in:
PHP → Level 3 → Challenge 121

lcfirst()String FunctionsConverts the first character of a string to lowercase

Introduced in:
PHP → Level 4 → Challenge 165

lcg_value()Math FunctionsReturns a pseudo random number in a range between 0 and 1
lchgrp()Filesystem FunctionsChanges the group ownership of a symbolic link
lchown()Filesystem FunctionsChanges the user ownership of a symbolic link
levenshtein()String FunctionsReturns the Levenshtein distance between two strings

Introduced in:
PHP → Level 4 → Challenge 178

LIBXML_BIGLINESlibxml ConstantsMake line numbers greater than 65535 to be reported correctly
libxml_clear_errors()libxml FunctionsClears the libxml error buffer
LIBXML_COMPACTlibxml ConstantsSet small nodes allocation optimization. This may improve the application performance
libxml_disable_entity_loader()libxml FunctionsDeprecated. Enables the ability to load external entities
LIBXML_DOTTED_VERSIONlibxml ConstantsGet dotted libxml version (e.g. 2.6.5 or 2.6.17)
LIBXML_DTDATTRlibxml ConstantsSet default DTD attributes
LIBXML_DTDLOADlibxml ConstantsLoad external subset
LIBXML_DTDVALIDlibxml ConstantsValidate with the DTD
LIBXML_ERR_ERRORlibxml ConstantsGet recoverable errors
LIBXML_ERR_FATALlibxml ConstantsGet fatal errors
LIBXML_ERR_NONElibxml ConstantsGet no errors
LIBXML_ERR_WARNINGlibxml ConstantsGet simple warnings
libxml_get_errors()libxml FunctionsGets the errors from the libxml error buffer
libxml_get_last_error()libxml FunctionsGets the last error from the libxml error buffer
LIBXML_HTML_NODEFDTDlibxml ConstantsPrevents a default doctype being added when no doctype is found
LIBXML_HTML_NOIMPLIEDlibxml ConstantsTurns off automatic adding of implied html and body elements
LIBXML_NOBLANKSlibxml ConstantsRemove blank nodes
LIBXML_NOCDATAlibxml ConstantsSet CDATA as text nodes
LIBXML_NOEMPTYTAGlibxml ConstantsChange empty tags into paired opening and closing tags when saving a document
LIBXML_NOENTlibxml ConstantsSubstitute entities
LIBXML_NOERRORlibxml ConstantsDo not show error reports
LIBXML_NONETlibxml ConstantsStop network access while loading documents
LIBXML_NOWARNINGlibxml ConstantsDo not show warning reports
LIBXML_NOXMLDECLlibxml ConstantsDrop the XML declaration when saving a document
LIBXML_NSCLEANlibxml ConstantsRemove excess namespace declarations
LIBXML_PARSEHUGElibxml ConstantsRelaxes any hardcoded limit from the parser, such as maximum document depth or text node size
LIBXML_PEDANTIClibxml ConstantsEnables pedantic error reporting
LIBXML_SCHEMA_CREATElibxml ConstantsCreate default or fixed value nodes during XSD schema validation
libxml_set_external_entity_loader()libxml FunctionsChanges the default external entity loader
libxml_set_streams_context()libxml FunctionsSets the streams context for the next libxml document load or write
libxml_use_internal_errors()libxml FunctionsDisables the standard libxml errors and enables user error handling
LIBXML_VERSIONlibxml ConstantsGet libxml version (e.g. 20605 or 20617)
LIBXML_XINCLUDElibxml ConstantsUse XInclude substitution
link()Filesystem FunctionsCreates a hard link
linkinfo()Filesystem FunctionsReturns information about a hard link
listKeywordsAssigns array elements into variables
list()Array FunctionsAssigns variables as if they were an array
localeconv()String FunctionsReturns locale numeric and monetary formatting information
localtime()Date/Time FunctionsReturns the local time
log()Math FunctionsReturns the natural logarithm of a number

Introduced in:
PHP → Level 7 → Challenge 345

log10()Math FunctionsReturns the base-10 logarithm of a number
log1p()Math FunctionsReturns log(1+number)
long2ip()Network FunctionsConverts a long integer address into a string in IPv4 format
lstat()Filesystem FunctionsReturns information about a file or symbolic link
ltrim()String FunctionsRemoves whitespace or other characters from the left side of a string

Introduced in:
PHP → Level 4 → Challenge 157

mRegular Expression SyntaxModifier. Performs a multiline search, so patterns anchored to the beginning or end of a string match the beginning or end of each line
M_1_PIMath ConstantsReturns 1/Pi (0.31830988618379067154)
M_2_PIMath ConstantsReturns 2/Pi (0.63661977236758134308)
M_2_SQRTPIMath ConstantsReturns 2 divided by the square root of PI (1.12837916709551257390)
M_EMath ConstantsReturns e (2.7182818284590452354)
M_EULERMath ConstantsReturns the Euler constant (0.57721566490153286061)
M_LN10Math ConstantsReturns the natural logarithm of 10 (2.30258509299404568402)
M_LN2Math ConstantsReturns the natural logarithm of 2 (0.69314718055994530942)
M_LNPIMath ConstantsReturns the natural logarithm of PI (1.14472988584940017414)
M_LOG10EMath ConstantsReturns the base-10 logarithm of E (0.43429448190325182765)
M_LOG2EMath ConstantsReturns the base-2 logarithm of E (1.4426950408889634074)
M_PIMath ConstantsReturns Pi (3.14159265358979323846)
M_PI_2Math ConstantsReturns Pi/2 (1.57079632679489661923)
M_PI_4Math ConstantsReturns Pi/4 (0.78539816339744830962)
M_SQRT1_2Math ConstantsReturns the square root of 1/2 (0.70710678118654752440)
M_SQRT2Math ConstantsReturns the square root of 2 (1.41421356237309504880)
M_SQRT3Math ConstantsReturns the square root of 3 (1.73205080756887729352)
M_SQRTPIMath ConstantsReturns the square root of PI (1.77245385090551602729)
mail()Mail FunctionsAllows you to send emails directly from a script
max()Math FunctionsReturns the highest value in an array, or the highest value of several specified values

Introduced in:
PHP → Level 3 → Challenge 144

md5()String FunctionsCalculates the MD5 hash of a string
md5_file()String FunctionsCalculates the MD5 hash of a file
metaphone()String FunctionsCalculates the metaphone key of a string
microtime()Date/Time FunctionsReturns the current Unix timestamp with microseconds
min()Math FunctionsReturns the lowest value in an array, or the lowest value of several specified values

Introduced in:
PHP → Level 3 → Challenge 144

mkdir()Filesystem FunctionsCreates a directory

Introduced in:
PHP → Level 8 → Challenge 391

mktime()Date/Time FunctionsReturns the Unix timestamp for a date
money_format()String FunctionsDeprecated. Returns a string formatted as a currency string
more_results()MySQLi FunctionsChecks if there are more results from a multi query
move_uploaded_file()Filesystem FunctionsMoves an uploaded file to a new location
mt_getrandmax()Math FunctionsReturns the largest possible value returned by mt_rand()
mt_rand()Math FunctionsGenerates a random integer using Mersenne Twister algorithm
mt_srand()Math FunctionsSeeds the Mersenne Twister random number generator
multi_query()MySQLi FunctionsPerforms one or more queries on the database
n*Regular Expression SyntaxQuantifier. Matches any string that contains zero or more occurrences of n
n+Regular Expression SyntaxQuantifier. Matches any string that contains at least one n
n?Regular Expression SyntaxQuantifier. Matches any string that contains zero or one occurrences of n
namespaceKeywordsDeclares a namespace

Introduced in:
PHP → Level 7 → Challenge 343

NANMath ConstantsNot A Number
natcasesort()Array FunctionsSorts an array using a case insensitive "natural order" algorithm
natsort()Array FunctionsSorts an array using a "natural order" algorithm
newKeywordsCreates an object
next()Array FunctionsAdvance the internal array pointer of an array
next_result()MySQLi FunctionsPrepares the next result-set from multi_query()
nl2br()String FunctionsInserts HTML line breaks in front of each newline in a string
nl_langinfo()String FunctionsReturns specific local information
number_format()String FunctionsFormats a number with grouped thousands

Introduced in:
PHP → Level 1 → Challenge 22

n{x,y}Regular Expression SyntaxQuantifier. Matches any string that contains a sequence of X to Y n's
n{x,}Regular Expression SyntaxQuantifier. Matches any string that contains a sequence of at least X n's
n{x}Regular Expression SyntaxQuantifier. Matches any string that contains a sequence of X n's
ob_clean()Output Control FunctionsDeletes all of the content from the topmost output buffer
ob_end_clean()Output Control FunctionsDeletes the topmost output buffer and all of its contents

Introduced in:
PHP → Level 9 → Challenge 434

ob_end_flush()Output Control FunctionsDeletes the topmost output buffer and outputs its contents
ob_flush()Output Control FunctionsOutputs the contents of the topmost output buffer and clears the buffer
ob_get_clean()Output Control FunctionsReturns all of the contents of the topmost output buffer and clears the buffer

Introduced in:
PHP → Level 9 → Challenge 432

ob_get_contents()Output Control FunctionsReturns the contents of the topmost output buffer
ob_get_flush()Output Control FunctionsOutputs and returns the contents of the topmost output buffer and then deletes the buffer
ob_get_length()Output Control FunctionsReturns the number of bytes of data that are in the topmost output buffer
ob_get_level()Output Control FunctionsReturns a number indicating how many output buffers are on the stack
ob_get_status()Output Control FunctionsReturns information about the output buffers
ob_gzhandler()Output Control FunctionsUsed as a callback function for ob_start() to compress the contents of the buffer when sending it to the browser
ob_implicit_flush()Output Control FunctionsTurns implicit flushing on or off
ob_list_handlers()Output Control FunctionsReturns an array of callback function names that are being used by the topmost output buffer
ob_start()Output Control FunctionsCreates a new output buffer and adds it to the top of the stack

Introduced in:
PHP → Level 9 → Challenge 432

octdec()Math FunctionsConverts an octal number to a decimal number
opendir()Directory FunctionsOpens a directory handle
openlog()Network FunctionsOpens the connection of system logger
options()MySQLi FunctionsSets extra connect options and affect behavior for a connection
orKeywordsA logical operator
ord()String FunctionsReturns the ASCII value of the first character of a string

Introduced in:
PHP → Level 4 → Challenge 179

output_add_rewrite_var()Output Control FunctionsUsed to append query string parameters to any URL in the output
output_reset_rewrite_vars()Output Control FunctionsRemoves all variables added by output_add_rewrite_var()
pack()Miscellaneous FunctionsPacks data into a binary string
parse_ini_file()Filesystem FunctionsParses a configuration file
parse_ini_string()Filesystem FunctionsParses a configuration string
parse_str()String FunctionsParses a query string into variables
pathinfo()Filesystem FunctionsReturns information about a file path
pclose()Filesystem FunctionsCloses a pipe opened by popen()
pfsockopen()Network FunctionsOpens a persistent Internet or Unix domain socket connection
PHP_ROUND_HALF_DOWNMath ConstantsRound halves down
PHP_ROUND_HALF_EVENMath ConstantsRound halves to even numbers
PHP_ROUND_HALF_ODDMath ConstantsRound halves to odd numbers
PHP_ROUND_HALF_UPMath ConstantsRound halves up
php_strip_whitespace()Miscellaneous FunctionsReturns the source code of a file with PHP comments and whitespace removed
pi()Math FunctionsReturns the value of PI
ping()MySQLi FunctionsPings a server connection, or tries to reconnect if the connection has gone down
poll()MySQLi FunctionsPolls connections
popen()Filesystem FunctionsOpens a pipe
pos()Array FunctionsAlias of current()
pow()Math FunctionsReturns x raised to the power of y

Introduced in:
PHP → Level 6 → Challenge 269

preg_filter()Regular Expression FunctionsReturns a string or an array with pattern matches replaced, but only if matches were found
preg_grep()Regular Expression FunctionsReturns an array consisting only of elements from the input array which matched the pattern
preg_last_error()Regular Expression FunctionsReturns an error code indicating the reason that the most recent regular expression call failed
preg_match()Regular Expression FunctionsFinds the first match of a pattern in a string

Introduced in:
PHP → Level 5 → Challenge 235

preg_match_all()Regular Expression FunctionsFinds all matches of a pattern in a string

Introduced in:
PHP → Level 5 → Challenge 242

preg_quote()Regular Expression FunctionsEscapes characters that have a special meaning in regular expressions by putting a backslash in front of them
preg_replace()Regular Expression FunctionsReturns a string where matches of a pattern are replaced with a substring in a given string

Introduced in:
PHP → Level 5 → Challenge 243

preg_replace_callback()Regular Expression FunctionsGiven an expression and a callback, returns a string where all matches of the expression are replaced with the substring returned by the callback
preg_replace_callback_array()Regular Expression FunctionsGiven an array associating expressions with callbacks, returns a string where all matches of each expression are replaced with the substring returned by the callback
preg_split()Regular Expression FunctionsBreaks a string into an array using matches of a regular expression as separators

Introduced in:
PHP → Level 5 → Challenge 244

prepare()MySQLi FunctionsPrepares an SQL statement for execution
prev()Array FunctionsRewinds the internal array pointer
printKeywordsOutput text

Introduced in:
PHP → Level 1 → Challenge 3

print()String FunctionsOutputs one or more strings

Introduced in:
PHP → Level 1 → Challenge 3

print_r()Variable Handling FunctionsPrints the information about a variable in a human-readable way

Introduced in:
PHP → Level 1 → Challenge 45

printf()String FunctionsOutputs a formatted string
privateKeywordsDeclare a property, method or constant as private

Introduced in:
PHP → Level 6 → Challenge 291

protectedKeywordsDeclare a property, method or constant as protected

Introduced in:
PHP → Level 6 → Challenge 292

publicKeywordsDeclare a property, method or constant as public

Introduced in:
PHP → Level 6 → Challenge 290

query()MySQLi FunctionsPerforms a query against a database
quoted_printable_decode()String FunctionsConverts a quoted-printable string to an 8-bit string
quoted_printable_encode()String FunctionsConverts an 8-bit string to a quoted printable string
quotemeta()String FunctionsQuotes meta characters
rad2deg()Math FunctionsConverts a radian value to a degree value
rand()Math FunctionsGenerates a random integer

Introduced in:
PHP → Level 6 → Challenge 266

range()Array FunctionsCreates an array containing a range of elements
readdir()Directory FunctionsReturns an entry from a directory handle
readfile()Filesystem FunctionsReads a file and writes it to the output buffer
readlink()Filesystem FunctionsReturns the target of a symbolic link
real_connect()MySQLi FunctionsOpens a new connection to the MySQL server
real_escape_string()MySQLi FunctionsEscapes special characters in a string for use in an SQL statement
real_query()MySQLi FunctionsExecutes a single SQL query
realpath()Filesystem FunctionsReturns the absolute pathname
realpath_cache_get()Filesystem FunctionsReturns realpath cache entries
realpath_cache_size()Filesystem FunctionsReturns realpath cache size
reap_async_query()MySQLi FunctionsReturns result from an async SQL query
refresh()MySQLi FunctionsRefreshes or flushes tables or caches, or resets the replication server information
registerXPathNamespace()SimpleXML FunctionsCreates a namespace context for the next XPath query
rename()Filesystem FunctionsRenames a file or directory
requireKeywordsEmbed code from another file
require_onceKeywordsEmbed code from another file
reset()Array FunctionsSets the internal pointer of an array to its first element
restore_error_handler()Error and Logging FunctionsRestores the previous error handler
restore_exception_handler()Error and Logging FunctionsRestores the previous exception handler
returnKeywordsExit a function and return a value

Introduced in:
PHP → Level 4 → Challenge 189

rewind()Filesystem FunctionsRewinds a file pointer
rewinddir()Directory FunctionsResets a directory handle
rmdir()Filesystem FunctionsRemoves an empty directory
rollback()MySQLi FunctionsRolls back the current transaction for the database
round()Math FunctionsRounds a floating-point number

Introduced in:
PHP → Level 6 → Challenge 264

rsort()Array FunctionsSorts an indexed array in descending order

Introduced in:
PHP → Level 3 → Challenge 118

rtrim()String FunctionsRemoves whitespace or other characters from the right side of a string

Introduced in:
PHP → Level 4 → Challenge 157

saveXML()SimpleXML FunctionsAlias of asXML()
scandir()Directory FunctionsReturns an array of files and directories of a specified directory

Introduced in:
PHP → Level 8 → Challenge 391

select_db()MySQLi FunctionsSelect the default database for database queries
serialize()Variable Handling FunctionsConverts a storable representation of a value

Introduced in:
PHP → Level 8 → Challenge 377

set_charset()MySQLi FunctionsSets the default client character set
set_error_handler()Error and Logging FunctionsSets a user-defined error handler function

Introduced in:
PHP → Level 8 → Challenge 361

set_exception_handler()Error and Logging FunctionsSets a user-defined exception handler function
set_file_buffer()Filesystem FunctionsAlias of stream_set_write_buffer(). Sets the buffer size for write operations on the given file
set_local_infile_default()MySQLi FunctionsUnsets user defined handler for load local infile command
set_local_infile_handler()MySQLi FunctionsSet callback function for LOAD DATA LOCAL INFILE command
set_socket_blocking()Stream FunctionsDeprecated in PHP 5.4, and removed in PHP 7.0. Alias of stream_set_blocking()
setcookie()Network FunctionsDefines a cookie to be sent along with the rest of the HTTP headers

Introduced in:
PHP → Level 9 → Challenge 421

setlocale()String FunctionsSets locale information
setrawcookie()Network FunctionsDefines a cookie without URL encoding, to be sent along with the rest of the HTTP headers
settype()Variable Handling FunctionsConverts a variable to a specific type

Introduced in:
PHP → Level 1 → Challenge 43

sha1()String FunctionsCalculates the SHA-1 hash of a string
sha1_file()String FunctionsCalculates the SHA-1 hash of a file
show_source()Miscellaneous FunctionsAlias of highlight_file()
shuffle()Array FunctionsShuffles an array
similar_text()String FunctionsCalculates the similarity between two strings

Introduced in:
PHP → Level 4 → Challenge 177

simplexml_import_dom()SimpleXML FunctionsReturns a SimpleXMLElement object from a DOM node
simplexml_load_file()SimpleXML FunctionsConverts an XML document to an object
simplexml_load_string()SimpleXML FunctionsConverts an XML string to an object
sin()Math FunctionsReturns the sine of a number
sinh()Math FunctionsReturns the hyperbolic sine of a number
sizeof()Array FunctionsAlias of count()
sleep()Miscellaneous FunctionsDelays code execution for a number of seconds
socket_get_status()Network FunctionsAlias of stream_get_meta_data()
socket_set_blocking()Network FunctionsAlias of stream_set_blocking()
socket_set_timeout()Network FunctionsAlias of stream_set_timeout()
sort()Array FunctionsSorts an indexed array in ascending order

Introduced in:
PHP → Level 3 → Challenge 117

soundex()String FunctionsCalculates the soundex key of a string
sprintf()String FunctionsWrites a formatted string to a variable

Introduced in:
PHP → Level 1 → Challenge 21

sqlstate()MySQLi FunctionsReturns the SQLSTATE error code for the error
sqrt()Math FunctionsReturns the square root of a number

Introduced in:
PHP → Level 6 → Challenge 269

srand()Math FunctionsSeeds the random number generator
sscanf()String FunctionsParses input from a string according to a format
ssl_set()MySQLi FunctionsUsed to establish secure connections using SSL
stat()Filesystem Functions / MySQLi FunctionsReturns information about a file
staticKeywordsDeclare a property or method as static

Introduced in:
PHP → Level 4 → Challenge 196

stmt_init()MySQLi FunctionsInitializes a statement and returns an object for use with stmt_prepare()
store_result()MySQLi FunctionsTransfers a result-set from the last query
str_contains()String FunctionsChecks if a string contains a specific substring (case-sensitive)

Introduced in:
PHP → Level 4 → Challenge 166

str_ends_with()String FunctionsChecks if a string ends with a specific substring (case-sensitive)

Introduced in:
PHP → Level 4 → Challenge 167

str_getcsv()String FunctionsParses a CSV string into an array
str_ireplace()String FunctionsReplaces some characters in a string (case-insensitive)
str_pad()String FunctionsPads a string to a new length

Introduced in:
PHP → Level 4 → Challenge 161

str_repeat()String FunctionsRepeats a string a specified number of times

Introduced in:
PHP → Level 4 → Challenge 171

str_replace()String FunctionsReplaces some characters in a string (case-sensitive)

Introduced in:
PHP → Level 4 → Challenge 152

str_rot13()String FunctionsPerforms the ROT13 encoding on a string
str_shuffle()String FunctionsRandomly shuffles all characters in a string
str_split()String FunctionsSplits a string into an array

Introduced in:
PHP → Level 4 → Challenge 162

str_starts_with()String FunctionsChecks if a string starts with a specific substring (case-sensitive)

Introduced in:
PHP → Level 4 → Challenge 167

str_word_count()String FunctionsCount the number of words in a string

Introduced in:
PHP → Level 4 → Challenge 173

strcasecmp()String FunctionsCompares two strings (case-insensitive)

Introduced in:
PHP → Level 4 → Challenge 176

strchr()String FunctionsAlias of strstr()
strcmp()String FunctionsCompares two strings (case-sensitive)

Introduced in:
PHP → Level 4 → Challenge 175

strcoll()String FunctionsCompares two strings (locale based string comparison)
strcspn()String FunctionsReturns the number of characters found in a string before any part of some specified characters are found
stream_bucket_prepend()Stream FunctionsPrepends a bucket to a bucket brigade inside a user stream filter
stream_context_create()Stream FunctionsCreates a stream context resource holding options for a stream
stream_context_get_default()Stream FunctionsRetrieves the default stream context
stream_context_get_options()Stream FunctionsRetrieves the options set on a stream or context
stream_context_get_params()Stream FunctionsRetrieves the parameters set on a stream or context
stream_context_set_default()Stream FunctionsSets the default stream context
stream_context_set_options()Stream FunctionsSets options on a stream or context
stream_context_set_params()Stream FunctionsSets parameters on a stream or context
stream_copy_to_stream()Stream FunctionsCopies data from one stream to another
stream_filter_append()Stream FunctionsAppends a filter to a stream
stream_filter_prepend()Stream FunctionsAttaches a filter to the start of a stream's filter chain
stream_filter_register()Stream FunctionsRegisters a user-defined stream filter class under a given name
stream_filter_remove()Stream FunctionsRemoves a filter that was previously attached to a stream
stream_get_contents()Stream FunctionsReads the remainder of a stream into a string
stream_get_filters()Stream FunctionsReturns a list of the registered stream filters
stream_get_line()Stream FunctionsReads one line from a stream up to a given delimiter
stream_get_meta_data()Stream FunctionsReturns header and metadata information about a stream
stream_get_transports()Stream FunctionsReturns a list of the available socket transports
stream_get_wrappers()Stream FunctionsReturns a list of the registered stream wrappers
stream_is_local()Stream FunctionsChecks whether a stream is a local stream
stream_isatty()Stream FunctionsChecks whether a stream refers to an interactive terminal
stream_notification_callback()Stream FunctionsCallback signature used to receive stream notifications
stream_register_wrapper()Stream FunctionsAlias of stream_wrapper_register()
stream_resolve_include_path()Stream FunctionsResolves a filename against the include path
stream_select()Stream FunctionsWaits for a change of status on one or more streams
stream_set_blocking()Stream FunctionsSwitches a stream between blocking and non-blocking mode
stream_set_chunk_size()Stream FunctionsSets the chunk size used when reading from a stream
stream_set_read_buffer()Stream FunctionsSets the buffer size used for reading from a stream
stream_set_timeout()Stream FunctionsSets a timeout period on a stream
stream_set_write_buffer()Stream FunctionsSets the buffer size used for writing to a stream
stream_socket_accept()Stream FunctionsAccepts a connection on a socket created by stream_socket_server()
stream_socket_client()Stream FunctionsOpens a connection to a socket server
stream_socket_enable_crypto()Stream FunctionsTurns encryption on or off for an already connected socket
stream_socket_get_name()Stream FunctionsReturns the name of the local or remote end of a socket
stream_socket_pair()Stream FunctionsCreates a pair of connected, indistinguishable socket streams
stream_socket_recvfrom()Stream FunctionsReceives data from a socket, whether connected or not
stream_socket_sendto()Stream FunctionsSends data to a socket, whether connected or not
stream_socket_server()Stream FunctionsCreates a server socket that listens for connections
stream_socket_shutdown()Stream FunctionsShuts down all or part of a full-duplex connection
stream_supports_lock()Stream FunctionsChecks whether a stream supports file locking
stream_wrapper_register()Stream FunctionsRegisters a user-defined stream wrapper for a protocol
stream_wrapper_restore()Stream FunctionsRestores a built-in stream wrapper that was previously unregistered
stream_wrapper_unregister()Stream FunctionsUnregisters a stream wrapper for a protocol
strftime()Date/Time FunctionsDeprecated. Formats a local time and/or date according to locale settings
strip_tags()String FunctionsStrips HTML and PHP tags from a string
stripcslashes()String FunctionsUnquotes a string quoted with addcslashes()
stripos()String FunctionsReturns the position of the first occurrence of a string inside another string (case-insensitive)

Introduced in:
PHP → Level 4 → Challenge 169

stripslashes()String FunctionsUnquotes a string quoted with addslashes()
stristr()String FunctionsFinds the first occurrence of a string inside another string (case-insensitive)
strlen()String FunctionsReturns the length of a string

Introduced in:
PHP → Level 1 → Challenge 24

strnatcasecmp()String FunctionsCompares two strings using a "natural order" algorithm (case-insensitive)
strnatcmp()String FunctionsCompares two strings using a "natural order" algorithm (case-sensitive)
strncasecmp()String FunctionsString comparison of the first n characters (case-insensitive)
strncmp()String FunctionsString comparison of the first n characters (case-sensitive)
strpbrk()String FunctionsSearches a string for any of a set of characters
strpos()String FunctionsReturns the position of the first occurrence of a string inside another string (case-sensitive)

Introduced in:
PHP → Level 4 → Challenge 168

strptime()Date/Time FunctionsDeprecated. Parses a time/date generated with strftime()
strrchr()String FunctionsFinds the last occurrence of a string inside another string
strrev()String FunctionsReverses a string

Introduced in:
PHP → Level 4 → Challenge 172

strripos()String FunctionsFinds the position of the last occurrence of a string inside another string (case-insensitive)
strrpos()String FunctionsFinds the position of the last occurrence of a string inside another string (case-sensitive)
strspn()String FunctionsReturns the number of characters found in a string that contains only characters from a specified charlist
strstr()String FunctionsFinds the first occurrence of a string inside another string (case-sensitive)
strtok()String FunctionsSplits a string into smaller strings
strtolower()String FunctionsConverts a string to lowercase letters

Introduced in:
PHP → Level 4 → Challenge 182

strtotime()Date/Time FunctionsParses an English textual datetime into a Unix timestamp

Introduced in:
PHP → Level 6 → Challenge 253

strtoupper()String FunctionsConverts a string to uppercase letters

Introduced in:
PHP → Level 1 → Challenge 24

strtr()String FunctionsTranslates certain characters in a string
strval()Variable Handling FunctionsReturns the string value of a variable
substr()String FunctionsReturns a part of a string

Introduced in:
PHP → Level 4 → Challenge 154

substr_compare()String FunctionsCompares two strings from a specified start position (binary safe and optionally case-sensitive)
substr_count()String FunctionsCounts the number of times a substring occurs in a string

Introduced in:
PHP → Level 4 → Challenge 170

substr_replace()String FunctionsReplaces a part of a string with another string

Introduced in:
PHP → Level 4 → Challenge 180

SUNFUNCS_RET_DOUBLEDate/Time ConstantsReturn value as hours in floating point form (example: 9.75) (since PHP 5.1.2)
SUNFUNCS_RET_STRINGDate/Time ConstantsReturn value as hours:minutes (example: 09:41) (since PHP 5.1.2)
SUNFUNCS_RET_TIMESTAMPDate/Time ConstantsReturn value as a timestamp (since PHP 5.1.2)
switchKeywordsCreate a switch block

Introduced in:
PHP → Level 2 → Challenge 65

symlink()Filesystem FunctionsCreates a symbolic link
sys_getloadavg()Miscellaneous FunctionsReturns the system load average
syslog()Network FunctionsGenerates a system log message
tan()Math FunctionsReturns the tangent of a number
tanh()Math FunctionsReturns the hyperbolic tangent of a number
tempnam()Filesystem FunctionsCreates a unique temporary file
thread_id()MySQLi FunctionsReturns the thread ID for the current connection
thread_safe()MySQLi FunctionsReturns whether the client library is compiled as thread-safe
throwKeywordsThrow an exception

Introduced in:
PHP → Level 7 → Challenge 350

time()Date/Time FunctionsReturns the current time as a Unix timestamp

Introduced in:
PHP → Level 6 → Challenge 252

time_nanosleep()Miscellaneous FunctionsDelays code execution for a number of seconds and nanoseconds
time_sleep_until()Miscellaneous FunctionsMakes a script sleep until the specified time
timezone_abbreviations_list()Date/Time FunctionsReturns an associative array containing dst, offset, and the timezone name
timezone_identifiers_list()Date/Time FunctionsReturns an indexed array with all timezone identifiers
timezone_location_get()Date/Time FunctionsReturns location information for a specified timezone
timezone_name_from_abbr()Date/Time FunctionsReturns the timezone name from abbreviation
timezone_name_get()Date/Time FunctionsReturns the name of the timezone
timezone_offset_get()Date/Time FunctionsReturns the timezone offset from GMT
timezone_open()Date/Time FunctionsCreates new DateTimeZone object
timezone_transitions_get()Date/Time FunctionsReturns all transitions for the timezone
timezone_version_get()Date/Time FunctionsReturns the version of the timezonedb
tmpfile()Filesystem FunctionsCreates a unique temporary file
touch()Filesystem FunctionsSets access and modification time of a file
traitKeywordsDeclare a trait

Introduced in:
PHP → Level 7 → Challenge 335

trigger_error()Error and Logging FunctionsCreates a user-level error message

Introduced in:
PHP → Level 8 → Challenge 361

trim()String FunctionsRemoves whitespace or other characters from both sides of a string

Introduced in:
PHP → Level 4 → Challenge 156

tryKeywordsCreate a try...catch structure

Introduced in:
PHP → Level 7 → Challenge 349

uRegular Expression SyntaxModifier. Enables correct matching of UTF-8 encoded patterns
uasort()Array FunctionsSorts an array by values using a user-defined comparison function and maintains the index association
ucfirst()String FunctionsConverts the first character of a string to uppercase

Introduced in:
PHP → Level 4 → Challenge 164

ucwords()String FunctionsConverts the first character of each word in a string to uppercase

Introduced in:
PHP → Level 4 → Challenge 163

uksort()Array FunctionsSorts an array by keys using a user-defined comparison function
umask()Filesystem FunctionsChanges file permissions for files
uniqid()Miscellaneous FunctionsGenerates a unique ID
unixtojd()Calendar FunctionsConverts Unix timestamp to Julian Day Count
unlink()Filesystem FunctionsDeletes a file

Introduced in:
PHP → Level 8 → Challenge 390

unpack()Miscellaneous FunctionsUnpacks data from a binary string
unserialize()Variable Handling FunctionsConverts serialized data back into actual data

Introduced in:
PHP → Level 8 → Challenge 378

unsetKeywordsDelete a variable or array element
unset()Variable Handling FunctionsUnsets a variable

Introduced in:
PHP → Level 2 → Challenge 92

useKeywordsUse a namespace

Introduced in:
PHP → Level 5 → Challenge 203

use_result()MySQLi FunctionsInitiates the retrieval of a result-set from the last query executed
user_error()Error and Logging FunctionsAlias of trigger_error()
usleep()Miscellaneous FunctionsDelays code execution for a number of microseconds
usort()Array FunctionsSorts an array by values using a user-defined comparison function

Introduced in:
PHP → Level 3 → Challenge 123

utf8_decode()XML Parser FunctionsDecodes a UTF-8 string to ISO-8859-1
utf8_encode()XML Parser FunctionsEncodes an ISO-8859-1 string to UTF-8
valid()SimpleXML FunctionsIteration. Checks whether the current element is valid
varKeywordsDeclare a variable
var_dump()Variable Handling FunctionsDumps information about one or more variables

Introduced in:
PHP → Level 1 → Challenge 41

var_export()Variable Handling FunctionsReturns structured information (valid PHP code) about a variable

Introduced in:
PHP → Level 8 → Challenge 400

vfprintf()String FunctionsWrites a formatted string to a specified output stream
vprintf()String FunctionsOutputs a formatted string
vsprintf()String FunctionsWrites a formatted string to a variable
warning_count()MySQLi FunctionsReturns the number of warnings from the last query in the connection
whileKeywordsCreate a while loop or end a do...while loop

Introduced in:
PHP → Level 2 → Challenge 79

wordwrap()String FunctionsWraps a string to a given number of characters

Introduced in:
PHP → Level 4 → Challenge 174

XML_ERROR_ASYNC_ENTITYXML Parser ConstantsInteger. An asynchronous entity was encountered
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REFXML Parser ConstantsInteger. An attribute value refers to an external entity
XML_ERROR_BAD_CHAR_REFXML Parser ConstantsInteger. A character reference refers to an invalid character
XML_ERROR_BINARY_ENTITY_REFXML Parser ConstantsInteger. A reference was made to a binary entity
XML_ERROR_DUPLICATE_ATTRIBUTEXML Parser ConstantsInteger. An attribute was declared twice on one element
XML_ERROR_EXTERNAL_ENTITY_HANDLINGXML Parser ConstantsInteger. An error occurred while handling an external entity
XML_ERROR_INCORRECT_ENCODINGXML Parser ConstantsInteger. The document does not match its declared encoding
XML_ERROR_INVALID_TOKENXML Parser ConstantsInteger. The parser met an invalid token
XML_ERROR_JUNK_AFTER_DOC_ELEMENTXML Parser ConstantsInteger. Content was found after the root element
XML_ERROR_MISPLACED_XML_PIXML Parser ConstantsInteger. An XML processing instruction was misplaced
XML_ERROR_NO_ELEMENTSXML Parser ConstantsInteger. The document contains no elements
XML_ERROR_NO_MEMORYXML Parser ConstantsInteger. The parser ran out of memory
XML_ERROR_NONEXML Parser ConstantsInteger. No parser error has occurred
XML_ERROR_PARAM_ENTITY_REFXML Parser ConstantsInteger. An illegal parameter entity reference was found
XML_ERROR_PARTIAL_CHARXML Parser ConstantsInteger. The parser met a partial multi-byte character
XML_ERROR_RECURSIVE_ENTITY_REFXML Parser ConstantsInteger. An entity refers to itself recursively
xml_error_string()XML Parser FunctionsReturns an error string from the XML parser
XML_ERROR_SYNTAXXML Parser ConstantsInteger. The document contains a syntax error
XML_ERROR_TAG_MISMATCHXML Parser ConstantsInteger. A closing tag does not match its opening tag
XML_ERROR_UNCLOSED_CDATA_SECTIONXML Parser ConstantsInteger. A CDATA section was left unclosed
XML_ERROR_UNCLOSED_TOKENXML Parser ConstantsInteger. A token was left unclosed
XML_ERROR_UNDEFINED_ENTITYXML Parser ConstantsInteger. A reference was made to an undefined entity
XML_ERROR_UNKNOWN_ENCODINGXML Parser ConstantsInteger. The document declares an unknown encoding
xml_get_current_byte_index()XML Parser FunctionsReturns the current byte index from the XML parser
xml_get_current_column_number()XML Parser FunctionsReturns the current column number from the XML parser
xml_get_current_line_number()XML Parser FunctionsReturns the current line number from the XML parser
xml_get_error_code()XML Parser FunctionsReturns an error code from the XML parser
XML_OPTION_CASE_FOLDINGXML Parser ConstantsInteger. Controls whether element and attribute names are case folded
XML_OPTION_SKIP_TAGSTARTXML Parser ConstantsInteger. Sets how many characters are skipped at the start of a tag name
XML_OPTION_SKIP_WHITEXML Parser ConstantsInteger. Controls whether whitespace-only values are skipped
XML_OPTION_TARGET_ENCODINGXML Parser ConstantsInteger. Sets the encoding used by the parser for its output
xml_parse()XML Parser FunctionsParses an XML document
xml_parse_into_struct()XML Parser FunctionsParses XML data into an array
xml_parser_create()XML Parser FunctionsCreates an XML parser
xml_parser_create_ns()XML Parser FunctionsCreates an XML parser with namespace support
xml_parser_free()XML Parser FunctionsFrees an XML parser
xml_parser_get_option()XML Parser FunctionsReturns options from an XML parser
xml_parser_set_option()XML Parser FunctionsSets options in an XML parser
XML_SAX_IMPLXML Parser ConstantsString. Holds the name of the underlying SAX implementation
xml_set_character_data_handler()XML Parser FunctionsSets up the character data handler for the XML parser
xml_set_default_handler()XML Parser FunctionsSets up the default data handler for the XML parser
xml_set_element_handler()XML Parser FunctionsSets up start and end element handlers for the XML parser
xml_set_end_namespace_decl_handler()XML Parser FunctionsSets up the end namespace declaration handler
xml_set_external_entity_ref_handler()XML Parser FunctionsSets up the external entity reference handler for the XML parser
xml_set_notation_decl_handler()XML Parser FunctionsSets up notation declaration handler for the XML parser
xml_set_object()XML Parser FunctionsAllows the XML parser to be used within an object
xml_set_processing_instruction_handler()XML Parser FunctionsSets up processing instruction handler
xml_set_start_namespace_decl_handler()XML Parser FunctionsSets up the start namespace declaration handler
xml_set_unparsed_entity_decl_handler()XML Parser FunctionsSets handler function for unparsed entity declarations
xorKeywordsA logical operator
xpath()SimpleXML FunctionsRuns an XPath query on XML data
yieldKeywordsUsed in generator functions
yield fromKeywordsUsed in generator functions
zip_close()Zip FunctionsCloses a ZIP file archive
zip_entry_close()Zip FunctionsCloses a ZIP directory entry
zip_entry_compressedsize()Zip FunctionsReturns the compressed file size of a ZIP directory entry
zip_entry_compressionmethod()Zip FunctionsReturns the compression method of a ZIP directory entry
zip_entry_filesize()Zip FunctionsReturns the actual file size of a ZIP directory entry
zip_entry_name()Zip FunctionsReturns the name of a ZIP directory entry
zip_entry_open()Zip FunctionsOpens a directory entry in a ZIP file for reading
zip_entry_read()Zip FunctionsReads from an open directory entry in the ZIP file
zip_open()Zip FunctionsOpens a ZIP file archive
zip_read()Zip FunctionsReads the next file in an open ZIP file archive

About Efiwe

Efiwe is a free, mobile-first, multimodal AI coding platform — no laptop needed. Learn how to code through gamified, bite-sized challenges with instant AI feedback. Works fully offline, supports 246 languages, and awards verifiable QR-coded certificates. Trusted by thousands of learners worldwide.
Master Future Skills. Even Offline.

Part of the MCF EdTech Fellowship

Read Aloud voice supported by

Get in Touch

Get Support: support@efiwe.com

Report Bug: bug@efiwe.comGet 🟡 1 coin

Follow on : @WithEfiwe

Download on the App StoreGet it on Google Play

Efiwe is an independent multinational company duly registered in Nigeria 🇳🇬 as Efiwe AI Nigeria Limited(RC 8862290) and India 🇮🇳 as Efiwe AI India Private Limited(CIN U62011UT2025PTC020060).