PHP Developers: start here #
This section of the help is for PHP developers who write PHP code on or for Exponential: kernel fixes, extensions,
modules and views, datatypes, persistent objects, fetch functions, template operators, workflow event types, cronjob
parts, commands, JSON and REST endpoints, and the tests that go with them. It explains the code base's conventions, the
rules the project checks on every change, and how code behaves under each runtime, with real class names, files and
commands of the repository.
Every statement on these pages was checked against the code, the settings or the existing documentation of the 6.0.15
line. Where these pages overlap with the pages for application creators and the extension developer book, they link to
them instead of repeating them.
Contents #
- Exponential in one paragraph, for PHP developers
- Your first hour
- Seven rules for every PHP change
- Map of the PHP developer pages
- Pages from other audiences you will use
- Finding these pages again
Exponential in one paragraph, for PHP developers #
Exponential is a free and open source PHP content management system and application framework, licensed under the
GNU GPL, version 2 or later. Its code base has been developed since 1999, first under the name eZ Publish, a product its
creator discontinued after almost 18 years; 7x kept it alive, and it is led by 7x together with the Exponential
Foundation (Who is 7x?, Who is the Exponential Foundation?).
For a PHP developer it is a large, mature code base with its own conventions: PHP 8.0 to 8.5 (PHP 7.4 usable without support), generated class maps
instead of PSR-4, layered INI settings read through eZINI, eZPersistentObject for tables, a compiled template
language, six supported databases (SQLite 3 by default, PostgreSQL, MongoDB, MariaDB, Oracle, MySQL), and Velocity, an
application server with persistent workers, as part of the product
(Exponential for PHP developers).
Your first hour #
- Orient yourself (10 minutes): Exponential for PHP developers and
A tour of the source tree.
- Follow one request (10 minutes): How a request runs in PHP.
- Set up a checkout (20 minutes): Setting up a PHP development checkout, with
make devtools and make hooks. - Learn the rules (10 minutes): Writing code that runs on PHP 8.0 and
The coding standard.
- Build something (10 minutes to start): Write your first module view.
The whole section in order is The PHP developer's reading path.
Seven rules for every PHP change #
- Runs on PHP 8.0 to 8.5 (PHP 7.4 usable without support). No syntax or unguarded function newer than 8.0
(Writing code that runs on PHP 8.0).
- Follows the house style.
array(), spaces inside parentheses, no type declarations; make phpcs and
make phpstan add nothing (The coding standard). - Is named with a prefix.
exp for project code, your own for yours; kernel eZ* identifiers never change
(Class naming and the exp prefix). - Trusts no input and escapes all output. Casts, allow lists,
escapeString(), |wash, the form token, permission
checks in every entry point (Security in PHP code). - Keeps no state between requests. Correct under Velocity's persistent workers
(Static state traps).
- Works on every supported database. Portable SQL or persistent objects
(Code for every supported database).
- Comes with a test. DB-less where possible (PHPUnit without a database).
Map of the PHP developer pages #
Orientation #
PHP versions and code rules #
Building blocks #
Data and APIs #
Security #
Runtimes #
Tests, quality and contributing #
Reference #
Pages from other audiences you will use #
| Page | Why PHP developers read it |
|---|
| Application creators: start here | Building complete applications: content API, queues, REST, deployment, scaling |
| The extension developer book | The full book for developers of extensions, from first steps to releasing, with an API reference in part 8 |
| Software Engineers: start here | Architecture, evaluation and engineering practice around Exponential |
| Web Framework Developers: start here | Exponential compared with and connected to other web frameworks |
| The template language, Template operators | The templates your PHP code feeds |
| Database support | The six databases, their versions, settings and test coverage |
| Develop with Git | Working with the repository |
| Free documentation | What you may do with these pages |
Finding these pages again #
- In the help, filter by the audience PHP Developers, or open All pages and the folder
php-developers. - Each page has Edit on GitHub. If a statement here no longer matches the code, tell us there or on the
community issue tracker.
Related pages #
Become an Exponential Partner
Partners share their information, provide funding, contribute back and
develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for
mid-2027: please become a partner today to speed up our growth rate and land new features faster.