Hypertext Preprocessor is a general-purpose programming language!

PHP for Mac

PHP for Mac

  -  22.35 MB  -  Open Source
PHP for Mac is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP for macOS powers everything from your blog to the most popular websites in the world.

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

Instead of lots of commands to output HTML (as seen in C or Perl), pages contain HTML with embedded code that does "something" (in this case, output "Hi, I'm a PHP script!"). The code is enclosed in special start and end processing instructions that allow you to jump into and out of "PHP mode."

What distinguishes PHP for macOS from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client.

The client would receive the results of running that script, but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.

The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don't be afraid reading the long list of PHP's features.

You can jump in, in a short time, and start writing simple scripts in a few hours.

How to Use

Install PHP via Homebrew with brew install php

Verify installation using php -v

Configure Apache or Nginx to use PHP

Test with a phpinfo() script in your web server

Use Composer to manage PHP dependencies

Write and run PHP scripts in Terminal or browser

Edit scripts using any code editor like VS Code

Update PHP using brew upgrade php

Use php -S localhost:8000 for local testing

System Requirements
  • macOS 10.15 (Catalina) or later
  • At least 4 GB RAM (8 GB recommended)
  • Homebrew package manager
  • Command Line Tools for Xcode
  • Internet connection for installation
PROS
  • Easy installation with Homebrew
  • Native macOS support for Apache
  • Strong community and documentation
  • Compatible with popular IDEs
  • Great for local web development
CONS
  • Older macOS may lack PHP support
  • Configuration can be complex
  • Built-in PHP deprecated in new macOS
  • Performance not optimized by default
  • Compatibility issues with some extensions
Also Available: Download PHP for Windows

Why is this app published on FileHorse? (More info)

What's new in this version:

Core:
- Fixed bug GH-20672 (Incorrect property_info sizing for locally shadowed trait properties)
- Fixed bugs GH-20875, GH-20873, GH-20854 (Propagate IN_GET guard in get_property_ptr_ptr for lazy proxies)

Bz2:
- Fix truncation of total output size causing erroneous errors

DOM:
- Fixed bug GH-21486 (DomHTMLDocument parser mangles xml:space and xml:lang attributes)

FFI:

Fixed resource leak in FFI:cdef() onsymbol resolution failure

GD:
- Fixed bug GH-21431 (phpinfo() to display libJPEG 10.0 support)

Opcache:
- Fixed bug GH-21052 (Preloaded constant erroneously propagated to file-cached script)
- Fixed bug GH-20838 (JIT compiler produces wrong arithmetic results)
- Fixed bug GH-21267 (JIT tracing: infinite loop on FETCH_OBJ_R with IS_UNDEF property in polymorphic context)
- Fixed bug GH-21395 (uaf in jit)

OpenSSL:
- Fixed bug GH-21083 (Skip private_key_bits validation for EC/curve-based keys)
- Fix missing error propagation for BIO_printf() calls

PCNTL:
- Fixed signal handler installation on AIX by bumping the storage size of the num_signals global

PCRE:
- Fixed re-entrancy issue on php_pcre_match_impl, php_pcre_replace_impl, php_pcre_split_impl, and php_pcre_grep_impl

Phar:
- Fixed bug GH-21333 (use after free when unlinking entries during iteration of a compressed phar)

SNMP:

Fixed bug GH-21336 (SNMP:setSecurity() undefined behavior with NULL arguments)

SOAP:
- Fixed Set-Cookie parsing bug wrong offset while scanning attributes

SPL:
- Fixed bug GH-21454 (missing write lock validation in SplHeap)

Standard:
- Fixed bug GH-20906 (Assertion failure when messing up output buffers)
- Fixed bug GH-20627 (Cannot identify some avif images with getimagesize)

Sysvshm:
- Fix memory leak in shm_get_var() when variable is corrupted

XSL:
- Fix GH-21357 (XSLTProcessor works with DOMDocument, but fails with DomXMLDocument)
- Fixed bug GH-21496 (UAF in dom_objects_free_storage)