Hypertext Preprocessor is a general-purpose programming language!

PHP for Mac

PHP for Mac

  -  22.33 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-20806 (preserve_none feature compatiblity with LTO)
- Fixed bug GH-20767 (build failure with musttail/preserve_none feature on macOs)
- Fixed bug GH-20837 (NULL dereference when calling ob_start() in shutdown function triggered by bailout in php_output_lock_error())
- Fix OSS-Fuzz #471533782 (Infinite loop in GC destructor fiber)
- Fix OSS-Fuzz #472563272 (Borked block_pass JMP[N]Z optimization)
- Fixed bug GH-20914 (Internal enums can be cloned and compared)
- Fix OSS-Fuzz #474613951 (Leaked parent property default value)
- Fixed bug GH-20895 (ReflectionProperty does not return the PHPDoc of a property if it contains an attribute with a Closure)
- Fixed bug GH-20766 (Use-after-free in FE_FREE with GC interaction)
- Fix OSS-Fuzz #471486164 (Broken by-ref assignment to uninitialized hooked backing value)
- Fix OSS-Fuzz #438780145 (Nested finally with repeated return type check may uaf)
- Fixed bug GH-20905 (Lazy proxy bailing __clone assertion)
- Fixed bug GH-20479 (Hooked object properties overflow)

Date:
- Update timelib to 2022.16

DOM:
- Fixed GH-21041 (DomHTMLDocument corrupts closing tags within scripts)

MbString:
- Fixed bug GH-20833 (mb_str_pad() divide by zero if padding string is invalid in the encoding)
- Fixed bug GH-20836 (Stack overflow in mb_convert_variables with recursive array references)

Opcache:
- Fixed bug GH-20818 (Segfault in Tracing JIT with object reference)

OpenSSL:
- Fix memory leaks when sk_X509_new_null() fails
- Fix crash when in openssl_x509_parse() when i2s_ASN1_INTEGER() fails
- Fix crash in openssl_x509_parse() when X509_NAME_oneline() fails

Phar:
- Fixed bug GH-20882 (buildFromIterator breaks with missing base directory)

PGSQL:
- Fixed INSERT/UPDATE queries building with PQescapeIdentifier() and possible UB

Readline:
- Fixed bug GH-18139 (Memory leak when overriding some settings via readline_info())

SPL:
- Fixed bug GH-20856 (heap-use-after-free in SplDoublyLinkedList iterator when modifying during iteration)

Standard:
- Fixed bug #74357 (lchown fails to change ownership of symlink with ZTS)
- Fixed bug GH-20843 (var_dump() crash with nested objects