Part 4 · Real projects / Mixed projects
Lesson 8 of 8

Mixed projects

Adopt ++PHP one file at a time. .php and .ppphp files live under the same source roots; plain PHP participates in checking and passes through to the build unchanged, so a mixed project still builds to a complete .php project.

This project mixes a legacy PHP class with new ++PHP code. The ++PHP file uses the plain PHP class directly:

main.ppphp
require_once __DIR__ . '/LegacyUser.php';

LegacyUser $user = new LegacyUser('Maya');

Press Build PHP and note the build copies the .php file and compiles the .ppphp file, then press Run to execute the result. That is the whole path. From here, the documentation covers the full language contract and CLI reference.

Read the docs