Hypertext Preprocessor is a general-purpose programming language!

PHP for Mac

PHP for Mac

  -  20.77 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 GH-18480 (array_splice with large values for offset/length arguments)
- Partially fixed GH-18572 (nested object comparisons leading to stack overflow)
- Fixed OSS-Fuzz #417078295
- Fixed OSS-Fuzz #418106144

Curl:
- Fixed GH-18460 (curl_easy_setopt with CURLOPT_USERPWD/CURLOPT_USERNAME/ CURLOPT_PASSWORD set the Authorization header when set to NULL)

Date:
- Fixed bug GH-18076 (Since PHP 8, the date_sun_info() function returns inaccurate sunrise and sunset times, but other calculated times are correct)
- Fixed bug GH-18481 (date_sunrise with unexpected nan value for the offset)

DOM:
- Backport lexbor/lexbor#274

Intl:
- Fix various reference issues

LDAP:
- Fixed bug GH-18529 (ldap no longer respects TLS_CACERT from ldaprc in ldap_start_tls())

Opcache:
- Fixed bug GH-18417 (Windows SHM reattachment fails when increasing memory_consumption or jit_buffer_size)
- Fixed bug GH-18297 (Exception not handled when jit guard is triggered)
- Fixed bug GH-18408 (Snapshotted poly_func / poly_this may be spilled)
- Fixed bug GH-18567 (Preloading with internal class alias triggers assertion failure)
- Fixed bug GH-18534 (FPM exit code 70 with enabled opcache and hooked properties in traits)
- Fix leak of accel_globals->key

OpenSSL:
- Fix missing checks against php_set_blocking() in xp_ssl.c

SPL:
- Fixed bug GH-18421 (Integer overflow with large numbers in LimitIterator)

Standard:
- Fixed bug GH-17403 (Potential deadlock when putenv fails)
- Fixed bug GH-18400 (http_build_query type error is inaccurate)
- Fixed bug GH-18509 (Dynamic calls to assert() ignore zend.assertions)

Windows:
- Fix leak+crash with sapi_windows_set_ctrl_handler()

Zip:
- Fixed bug GH-18431 (Registering ZIP progress callback twice doesn't work)

Fixed bug GH-18438 (Handling of empty data and errors in ZipArchive:addPattern)