We stand with Ukraine to help keep people safe. Join us
EN
When you purchase through links on our site, we may earn an affiliate commission

PHP for Mac

Server-side, cross-platform, HTML embedded scripting language.

Free
In English
5.0
Based on 7 user rates

PHP overview

This is a PHP module for the Apache Web server included in OS X. PHP is a server-side, cross-platform scripting language. PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

What's new in version 8.5.12

Core:
  • Fixed GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp (Avoid state corruption via bailout).
  • Fixed bug GH-23644 (Optimizer leaves a constant-vs-constant comparison unfolded, crashing the VM in zval_undefined_cv).
  • Fixed OSS-Fuzz 532353396 (assertion failure with static type).
  • Fix GH-23662 (Avoid NAN warning in print_r()).
  • Fix GH-21999: GC inconsistency with lazy object, var_dump(), and object comparison.
  • Fixed OSS-Fuzz #536440507 (Immutable class incorrect assertion).
  • Fixed AVX being reported as supported when the OS has not enabled AVX state.
  • Fixed GH-23980 (ZEND_ASSERT violation @ ZEND_INCLUDE_OR_EVAL).
  • Fixed use-after-free when a dl()-loaded extension declares a frameless function and a later request calls it.
  • Fixed System V shared memory emulation for Windows attaching segments past the end of their mapping.
  • Fixed exception thrown by destructor during GC in a Fiber not being rethrown into the frame that triggered the GC.
BCMath:
  • Fixed BcMath\Number results that truncate to zero keeping a negative sign and comparing less than zero.
BZ2:
  • Fixed double close of the descriptor and use-after-free of the inner stream when bzopen() is given a stream resource.
CLI:
  • Fix GH-22567 (Windows ZTS CLI SAPI should refresh its TSRMLS cache during request activation).
  • Fixed bug GH-23764 (Built-in server leaks a file descriptor on every HEAD request for a static file).
  • Fixed crash in the built-in server when a client is reset before being accepted.
  • Fixed the built-in server truncating an error page and leaking its unsent part after a partial socket write.
DOM:
  • Fixed DOMXPatFixed use-after-free when re-constructing a DOMXPath whose php:function registrations are freed while still reachable from the cycle collector.
  • Fixed Dom\HTMLDocument::getElementById() not finding ids of SVG and MathML elements.
  • Fixed Dom\HTMLDocument giving attributes the namespace of their element when a fragment is parsed with an xlink, xml or xmlns context element.
  • Fixed bug GH-23887 (Dom\HTMLCollection::namedItem() assertion failure, hang, or missed first element).
  • h and Dom\XPath losing the context node and in-scope namespaces of an evaluation after a php:function() callback evaluated another expression on the same object.
FFI:
  • Fixed crashes with FFI callbacks created from __call() trampolines and array callables whose object is released.
FTP:
  • Fixed bug GH-23619 (cryptic error on servers that don't support TLS session resumption on data connection).
GD:
  • Fixed undefined behavior with GD2 images with `INT_MAX`-sized chunks.
  • Fixed undefined behavior with GIFs with problematic LZW compression data.
Intl:
  • Fixed cloning IntlDateFormatter and MessageFormatter losing PHP-side state such as dateType, timeType, calendar and the message pattern.
  • Fixed a crash when converting with a cloned UConverter that uses toUCallback/fromUCallback.
  • Fixed Collator attribute and strength methods not rejecting an unconstructed Collator.
  • Fixed crash in intl_error_set_custom_msg() without an active call frame.
  • Fixed grapheme_strstr() and grapheme_stristr() returning incorrect substrings when supplementary characters precede the match.
  • Fixed grapheme_strstr() and grapheme_strpos() missing canonically equivalent matches, and grapheme searches reporting ICU errors for empty haystacks.
  • Fixed grapheme_strrpos() and grapheme_strripos() skipping overlapping matches when using a negative offset.
  • Fixed IntlDateFormatter::parse(), localtime() and parseToCalendar() treating the offset as UTF-16 code units instead of bytes.
Lexbor:
  • Merge patches lexbor/lexbor@8a14bc0 and lexbor/lexbor@f67ce4b, fixing a heap buffer overflow in :lexbor-contains() parsing and buffer overflows in malformed decode replay.
  • Merge patches lexbor/lexbor@859f100, lexbor/lexbor@a36e09a, lexbor/lexbor@b0f7412, lexbor/lexbor@1b215a8, lexbor/lexbor@385afff, lexbor/lexbor@e6c068f, lexbor/lexbor@327a8b6, lexbor/lexbor@917742f and lexbor/lexbor@e89c258, fixing dropped usernames containing an at sign, uninitialized memory in IDNA buffer growth, the encoding of a space before a query or fragment in an opaque path, a query or fragment lost after a dot segment in a path, replacement file drive paths, the output encoding used for percent-encoding, the URLSearchParams tail pointer and fragment serialization without a query.
MBString:
  • Fixed bug GH-23106 (mb_strpos() reads past the end of a haystack ending in a truncated UTF-8 sequence).
  • Fixed mbstring functions emitting surrogates in UTF-8 output and flagging it as valid UTF-8.
MySQLi:
  • Fix GH-22854: Fixed failed assertion when accessing mysqli property after failed reconnection.
MySQLnd:
  • Fixed field_count not resetting on OK packet.
  • Fixed memory leak when closing a prepared statement after its connection was killed.
Opcache:
  • Fixed OSS-Fuzz #546798343 (Heap-buffer-overflow in optimizer with FCCs and inlining).
  • Fixed bug GH-23693 (Tracing JIT produces wrong results for a guard on a loop-invariant addition).
  • Fixed OSS-Fuzz #5674034779193344 (Read of uninitialized memory in is_cacheable_stream_path()).
  • Fix zend_analyze_calls() call_stack buffer overrun.
  • Fixed bug GH-23628 (Tracing JIT reads undefined property slots of lazy proxy objects instead of forwarding to the real instance).
  • Fixed bug GH-23679 (Tracing JIT writes a parent private property into a child's shadowing public property).
  • Fix multiple incorrect DCE due to unsound escape analysis.
  • Fixed bug GH-24063 (OPcache optimizer folds `$cond ? -0.0 : 0.0` into a single `-0.0` constant).
  • Fixed crash when a file cache is reused with a different set of extensions declaring frameless functions.
  • Fixed bug GH-23991 (JIT generates invalid IR for multiple recursive calls).
  • Fix SCCP evaluation of isset()/empty() on dimension of non-escaping object.
  • Fixed bug GH-20890 (Segfault in zval_undefined_cv with non-simple property hook with minimal tracing JIT).
OpenSSL:
  • Fixed stream_socket_enable_crypto() leaving the socket non-blocking after a handshake timeout.
  • Fixed feof() on a TLS stream staying false after a close_notify on Windows.
PCNTL:
  • Fixed pcntl_signal_dispatch() dropping the queued signals when it runs while an exception is pending.
  • Fixed pcntl_signal_dispatch() dropping the signals queued behind a handler that throws.
  • Fixed bug GH-23986 (/proc/self paths resolve to the parent process after pcntl_fork()).
PDO:
  • Fixed PDOStatement::getColumnMeta() reading out of bounds for an invalid column index.
  • Fixed PDOStatement::bindColumn() registering a binding for a column name that is not in the result set.
  • Fixed PDOStatement::execute() leaving the previous result available after a failed execution.
  • Fixed a use-after-free when bindValue()/execute()/closeCursor() is called from a bound parameter's __toString() during execute().
  • Fixed bug GH-23962 (Destroying a persistent PDO instance rolls back a transaction still in use by another instance).
  • Fixed PDO::setAttribute() installing a PDO::ATTR_STATEMENT_CLASS class whose constructor arguments it rejects.
  • Fixed PDO::ATTR_STATEMENT_CLASS constructor_args type errors reporting "array given" regardless of the value passed.
  • Fixed PDOStatement::bindParam() and bindColumn() leaking the driver options value.
  • Fixed PDOStatement not reporting its bound parameters and columns to the cycle collector.
  • Fixed PDOStatement::setFetchMode() not applying changes atomically.
PDO_DBLIB:
  • Fixed bug GH-23741 (segfault after a failed query inside a PDO transaction). Errors raised by beginTransaction(), commit(), rollBack() and lastInsertId() are now reported instead of being dropped.
PDO_Firebird:
  • Fixed bug GH-23758 (PDO_Firebird returns null for non-null empty BLOBs).
PGSQL:
  • Fixed pg_lo_write() rejecting data containing null bytes.
  • Removed pg_service(), unavailable with any released libpq.
Readline:
  • Fixed a heap over-read in the interactive shell prompt when cli.prompt is set to an empty string.
Reflection:
  • Fixed bug GH-23842 (ReflectionProperty::skipLazyInitialization() copies invalid constant defaults with OPcache).
Session:
  • Fixed session_start() continuing after a failed create_sid() when session.use_strict_mode rejects the supplied ID.
  • Fixed exceptions from user-defined create_sid() handlers being replaced by return-value validation errors.
SimpleXML:
  • Fixed reconstructing a SimpleXMLElement freeing a child element that another variable still references.
SOAP:
  • Fixed bug GH-22895 (Heap use-after-free while encoding a Traversable with an illegal key).
  • Fixed memory leak when load_wsdl_ex() failed to load.
SQLite:
  • Fixed a crash when SQLite3::close() is called from a userland callback.
Standard:
  • Fixed sha1_file() returning a digest for incomplete data after a stream read failure.
  • Fixed iptcembed() corrupting JPEG headers when called recursively from an output handler.
  • Fixed proc_open() leaking descriptor zero when descriptor setup fails.
  • Fixed three Windows-only proc_open() defects: an uninitialized PROCESS_INFORMATION, an indeterminate comspec pointer after a failed lookup, and an unchecked CreateFileA() failure.
  • Fix persistent stream context lifetime during shutdown (Levi Morrison)
  • Fix wordwrap() ignoring an existing break at the end of the string (Nicolas Grekas)
  • Fixed convert.quoted-printable-decode decoding lowercase hex digits to the wrong byte.
  • Fixed chown() and lchown() failing to resolve user names in ZTS builds when getpwnam_r() needs a larger buffer.
Tidy:
    Fixed a use-after-free when a tidyNode is used after its document is reparsed.
Zlib:
  • Fixed inflate_init() dropping the preset dictionary for raw streams with a non-default window.
View older PHP versions

PHP for Mac

Free
In English
Version 8.5.12
Write a detailed review about PHP

Write your thoughts in our old-fashioned comment

MacUpdate Comment Policy. We strongly recommend leaving comments, however comments with abusive words, bullying, personal attacks of any type will be moderated.
5.0

(23 Reviews of PHP)

  • Comments

  • User Ratings

Just-Fred
Just-Fred
Apr 19, 2023
8.2.5
0.0
Apr 19, 2023
0.0
Version: 8.2.5
Once again, the description given by MacUpdate is 100% wrong. This is a source code bundle and not a binary package. In order to use it, one must have Xcode installed and be able to compile it. Having found a need to use PHP to create a database-backed web site, I chose to use MacPorts (Homebrew is usually recommended, but I don't intend to install many "sidecar" Mac apps, and MacPorts seems less intrusive. On a plus note, PHP now includes its own built-in development web server, so configuring and running Apache (now called apache2 on Macs) isn't needed. A simple command: php -S <server>:<port> <optional: -t webhomedirectory> is all that's needed.
Parchment Press
Parchment Press
Dec 4, 2013
5.5.6
0.0
Dec 4, 2013
0.0
Version: 5.5.6
Why o why does MacUpdate track Unix software in the main Mac software channel? Just a suggestion, but i would prefer it if you had a separate tab/category for server software, daemons, CLI utilities and the like. That way, the 90% who don't use it won't have to contend with the added entries on the tracker. (I do personally use a lot of server-oriented software and CLI tools, so i would personally check that category for updates. But my preference would be to separate them out to another category listing.)
Neil-M
Neil-M
Jun 1, 2011
5.3.0-3
0.0
Jun 1, 2011
0.0
Version: 5.3.0-3
From the developers website; Note: The package on this page is outdated. I recommend this new PHP distribution for Mac OS X, it is based on mine: http://blog.liip.ch/archive/2011/04/13/php-5-3-for-os-x-10-6-one-line-installer.html http://php-osx.liip.ch/ - is the best source for a 10.6 version of php.
schmelding
schmelding
Sep 4, 2009
5.3.0-3
0.0
Sep 4, 2009
0.0
Version: 5.3.0-3
Since Snow Leopard wiped-out my install of the entropy version of PHP, does anybody know what would happen if I reinstalled this?
Neil-M
Neil-M
Jul 31, 2009
5.3.0-3
0.0
Jul 31, 2009
0.0
Version: 5.3.0-3
Now PHP 5.3.0-3 Thanks Marc for compiling this for OS X - it gets me an easy way to get an upto date php distro, with GD (not on Apple's vanilla inbuilt), etc. onto my server - without waiting, waiting for Apple to update.
Sandro-Bilbeisi
Sandro-Bilbeisi
Nov 15, 2014
5.0
Nov 15, 2014
5.0
Version: null
BlakeC6588
BlakeC6588
Oct 15, 2013
5.0
Oct 15, 2013
5.0
Version: null
Sparrowhawk
Sparrowhawk
Sep 17, 2013
5.0
Sep 17, 2013
5.0
Version: null
olamaekle
olamaekle
Aug 6, 2013
5.0
Aug 6, 2013
5.0
Version: null
Zetsurin
Zetsurin
Dec 20, 2006
5.0
Dec 20, 2006
5.0
Version: null
Guest
Guest
Sep 28, 2004
4.8
Sep 28, 2004
4.8
Version: null
Guest
Guest
May 19, 2003
5.0
May 19, 2003
5.0
Version: null