Hypertext Preprocessor is a general-purpose programming language!

PHP for Mac

PHP 8.1.0

  -  18.7 MB  -  Open Source

Sometimes latest versions of the software can cause issues when installed on older devices or devices running an older version of the operating system.

Software makers usually fix these issues but it can take them some time. What you can do in the meantime is to download and install an older version of PHP 8.1.0.


For those interested in downloading the most recent release of PHP for Mac or reading our review, simply click here.


All old versions distributed on our website are completely virus-free and available for download at no cost.


We would love to hear from you

If you have any questions or ideas that you want to share with us - head over to our Contact page and let us know. We value your feedback!

What's new in this version:

Core:
- Fixed inclusion order for phpize builds on Windows
- Added missing hashtable insertion APIs for arr/obj/ref
- Implemented FR #77372 (Relative file path is removed from uploaded file)
- (CE_CACHE allocation with concurrent access)
- (Fiber does not compile on AIX)
- (SEGFAULT in zend_do_perform_implementation_check)
- (Header injection via default_mimetype / default_charset)
- (Fix compile failure on Solaris with clang)
- (Observer may not be initialized properly)
- (Using Enum as key in WeakMap triggers GC + SegFault)
- (TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php)
- (unset() of $GLOBALS sub-key yields warning)
- (New ampersand token parsing depends on new line after it)
- (Unicode characters in cli.prompt causes segfault)
- ("Declaration should be compatible with" gives incorrect line number with traits)
- (CLI server: insufficient cleanup if request startup fails)
- (match error message improvements)
- (Fiber support missing for Solaris Sparc)
- (Comparison of fake closures doesn't work)
- (powerpc64 build fails on fibers)
- (Cyclic unserialize in TMPVAR operand may leak)
- (__sleep allowed to return non-array)
- (function scope static variables are not bound to a unique function)
- (__callStatic fired in base class through a parent call if the method is private)
- (incorrect debug info on Closures with implicit binds)

CLI:
- (Server logs incorrect request method)

COM:
- Dispatch using LANG_NEUTRAL instead of LOCALE_SYSTEM_DEFAULT

Curl:
- (Support CURLOPT_SSLCERT_BLOB for cert strings)

Date:
- (Regression Incorrect difference after timezone change)
- (Interval serialization regression since 7.3.14 / 7.4.2)
- (Incorrect timezone transition details for POSIX data)
- (Missing second with inverted interval)
- Speed up finding timezone offset information
- (date_create_from_format misses leap year)
- (DateTimeZone::getTransitions() truncated)
- (Wrong diff between 2 dates in different timezones)
- (Missing second with inverted interval)
- (DateTimeZone silently falls back to UTC when providing an offset with seconds)
- (Regression in 8.1: add() now truncate ->f)
- (Date interval calculation not correct)
- (Incorrect difference using DateInterval)
- (date_diff() function returns false result)
- (dst not handled past 2038)
- (Wrong date diff)
- (DateTime. diff returns negative values)
- (date_diff on two dates with timezone set localised returns wrong results)
- (Incorrect date from timestamp)
- (Extra day on diff between begin and end of march 2016)
- (DateTime::diff confuse on timezone 'Asia/Tokyo')
- (Datetime add not realising it already applied DST change)
- (DateTimeImmutable::getTimestamp() triggers DST switch in incorrect time)
- (Handling DST transitions correctly)
- (Date diff is bad calculated, in same time zone)
- (DateTime::add does only care about backward DST transition, not forward)
- (DateTime->diff having issues with leap days for timezones ahead of UTC)
- (Date difference varies according day time)
- (DateTime's diff DateInterval incorrect in timezones from UTC+01:00 to UTC+12:00)
- (diff makes wrong in hour for Asia/Tehran)
- (DateTime::diff() generates months differently between time zones)
- (timelib mishandles future timestamps (triggered by 'zic -b slim'))
- (Invalid date time created (with day "00"))
- (DateTime calculate wrong with DateInterval)
- (DateTime objects behave incorrectly around DST transition)
- (DateTime(Immutable)::sub around DST yield incorrect time)

DBA:
- (TokyoCabinet driver leaks memory)

DOM:
- (DOMElement::setIdAttribute() called twice may remove ID)

FFI:
- ("TYPE *" shows unhelpful message when type is not defined)

Filter:
- (FILTER_FLAG_IPV6/FILTER_FLAG_NO_PRIV|RES_RANGE failing)

FPM:
- (Future possibility for heap overflow in FPM zlog)
- (PHP-FPM oob R/W in root process leading to privilege escalation) (CVE-2021-21703)
- Added openmetrics status format
- Enable process renaming on macOS
- Added pm.max_spawn_rate option to configure max spawn child processes rate
- (Events port mechanism)

FTP:
- Convert resource<ftp> to object \FTP\Connection

GD:
- (libpng warning from imagecreatefromstring)
- Convert resource<gd font> to object \GdFont
- Added support for Avif image

hash:
- Implemented FR #68109 (Add MurmurHash V3)
- Implemented FR #73385 (Add xxHash support)

JSON:
- (Change of $depth behaviour in json_encode() on PHP 8.1)

LDAP:
- Convert resource<ldap link> to object \LDAP\Connection
- Convert resource<ldap result> to object \LDAP\Result
- Convert resource<ldap result entry> to object \LDAP\ResultEntry

MBString:
- (mbstring may use pointer from some previous request)
- (mb_detect_encoding() regression)
- (mb_detect_encoding misdetcts ASCII in some cases)
- (mb_detect_encoding() segfaults when 7bit encoding is specified)

MySQLi:
- (Emulate mysqli_fetch_all() for libmysqlclient)
- (Replace language in APIs and source code/docs)
- (Add option to specify LOAD DATA LOCAL white list folder (including libmysql))

MySQLnd:
- (Crash (Bus Error) in mysqlnd due to wrong alignment)
- (PDO uses too much memory)

Opcache:
- (Incorrect JIT code for ADD with a reference to array)
- (Memory leak in PHPUnit with functional JIT)
- (infinite loop in building cfg during JIT compilation)
- (Wrong result with pow operator with JIT enabled)
- (Intermittent property assignment failure with JIT enabled)
- (Assertion `zv != ((void *)0)' failed for "preload" with JIT)
- (building opcache with phpize fails)
- (opcache header not installed)
- Added inheritance cache

OpenSSL:
- ($tag argument of openssl_decrypt() should accept null/empty string)
- Bump minimal OpenSSL version to 1.0.2

PCRE:
- (PCRE2 10.35 JIT performance regression)
- Bundled PCRE2 is 10.37

PDO:
- (PDO_MYSQL: PDO::PARAM_LOB does not bind to a stream for fetching a BLOB)

PDO MySQL:
- (PDO::lastInsertId() return wrong)
- (PDO discards error message text from prepared statement)

PDO OCI:
- (Support 'success with info' at connection)

PDO ODBC:
- Implement PDO_ATTR_SERVER_VERSION and PDO_ATTR_SERVER_INFO for PDO::getAttribute()

PDO PgSQL:
- (pdo_pgsql: Inconsitent boolean conversion after calling closeCursor())

PDO SQLite:
- (Proper data-type support for PDO_SQLITE)

PgSQL:
- (pg_end_copy still expects a resource)
- Convert resource<pgsql link> to object \PgSql\Connection
- Convert resource<pgsql result> to object \PgSql\Result
- Convert resource<pgsql large object> to object \PgSql\Lob

Phar:
- Use SHA256 by default for signature
- Add support for OpenSSL_SHA256 and OpenSSL_SHA512 signature

phpdbg:
- (unknown help topic causes assertion failure)

PSpell:
- Convert resource<pspell> to object \PSpell\Dictionary
- Convert resource<pspell config> to object \PSpell\Config

readline:
- (invalid read in readline completion)

Reflection:
- (ArgumentCountError when getting default value from ReflectionParameter with new)
- (PHP 8.1: ReflectionClass->getTraitAliases() crashes with Internal error)
- (Enum: ReflectionMethod->getDeclaringClass() return a ReflectionClass)
- (Make ReflectionEnum and related class non-final)
- (ReflectionProperty::getDefaultValue() returns current value for statics)
- (ReflectionProperty::__toString() renders current value, not default value)
- (ReflectionAttribute is not a Reflector)
- (no way to determine if Closure is static)
- Implement ReflectionFunctionAbstract::getClosureUsedVariables

Shmop:
- (shmop_open won't attach and causes php to crash)

SimpleXML:
- (Segfault in zif_simplexml_import_dom)

SNMP:
- Implement SHA256 and SHA512 for security protocol

Sodium:
- Added the XChaCha20 stream cipher functions
- Added the Ristretto255 functions, which are available in libsodium 1.0.18

SPL:
- (SplFileObject::fgetcsv incorrectly returns a row on premature EOF)
- (Recursive SplFixedArray::setSize() may cause double-free)
- (LimitIterator + SplFileObject regression in 8.0.1)
- (Special json_encode behavior for SplFixedArray)
- ("Notice: Undefined index" on unset() ArrayObject non-existing key)
- (FilesystemIterator::FOLLOW_SYMLINKS remove KEY_AS_FILE from bitmask)

Standard:
- (gethostbyaddr('::1') returns ip instead of name after calling some other method)
- (Incorrectly using libsodium for argon2 hashing)
- (PHP 7.3+ memory leak when unserialize() is used on an associative array)
- (Serialization is unexpectedly allowed on anonymous classes with __serialize())
- (hrtime breaks build on OSX before Sierra)
- (method_exists on Closure::__invoke inconsistency)

Streams:
- (stream_isatty emits warning with attached stream wrapper)

XML:
- (special character is breaking the path in xml function) (CVE-2021-21707)
- (XML_OPTION_SKIP_WHITE strips embedded whitespace)

Zip:
- (ZipArchive::extractTo() may leak memory)
- (Dirname ending in colon unzips to wrong dir)
- (ZipArchive::extractTo extracts outside of destination) (CVE-2021-21706)
- (ZipArchive::getStream doesn't use setPassword)