Skip to content

How Compiled PHP GUI Applications Work

GUI applications created with ExeOutput for PHP are feature-rich, combining several technologies such as PHP, JavaScript, the Chromium rendering (CEF3) engine, HEScript, and the Windows API.

An Application with a Custom Interface

ExeOutput for PHP generates a single executable file: end users simply need to double-click it to launch the application. A main window that mimics a web browser appears, displaying your PHP pages. End users navigate PHP pages as if they were hosted on a remote server.

Additionally, you can design your own user interface style for your compiled application, whether it's a browser-style interface or a modern Windows app. This flexibility is made possible by the integrated user interface designer.

An Application Featuring Three Components

Your compiled application consists of three main components: the internal browser, the internal storage, and the PHP engine.

Compiled PHP Application

Internal Browser

The internal browser allows end users to navigate through your compiled website. Nearly every aspect of the browser (interface, navigation menus, features) can be customized. The HTML rendering engine is Chromium, utilizing the Chromium Embedded Framework version 3. You can customize the rendering engine here.

Any HTML page compatible with Google Chrome should render successfully in the internal browser while maintaining full functionality. However, the key difference from Chrome is that source HTML and PHP files of your website are never directly accessible to the end user. As illustrated in the flowchart above, users have no access to the internal storage. Moreover, several options are available to protect your HTML source code. For example, the context menu with the "Show Source Code" command is disabled by default, without relying on any JavaScript workarounds.

Note

Console (CLI) applications do not include an internal browser: PHP operates in CLI mode.

Internal Storage

The internal storage holds source files that have been compressed and encoded by ExeOutput for PHP. It also manages a virtual storage in memory where files may be unpacked as needed. The internal storage is only accessible by the internal browser and the PHP engine.

PHP Runtime

The PHP runtime is invoked by the browser each time a PHP script needs to be executed. The PHP runtime interprets the PHP code and typically returns HTML data that is displayed within the browser. It retrieves all PHP files and other necessary files from the internal storage.

All standard PHP functions are available, and you can even access remote web servers (such as database servers) or local files. ExeOutput for PHP provides several functions to load and save local files:

Accessing Files in Compiled PHP Applications

How to Create and Save Files with PHP

Advice for Getting Started with PHP Applications in ExeOutput for PHP