Is it possible to use conditional statements across multiple files in PHP using includes?

When using includes in PHP to include multiple files, it is possible to use conditional statements across these files by defining the condition in one file and including that file in the others. This way, the condition will be shared among all the included files, allowing for consistent conditional logic across the application.

// condition.php
$condition = true;

// file1.php
include 'condition.php';
if ($condition) {
    // code block
}

// file2.php
include 'condition.php';
if ($condition) {
    // code block
}