require_once 'animals/ueberdog.php'; require 'animals/cat.inc'; # Dynamic include/require statements like the # following should be kept untouched, even if # mergeScripts is on: $animal = 'fox'; require 'animals/' . $animal . '.php'; $fox = new Fox(); $dog = new Dog(); function end_sentence($end_character) { return $end_character; } # Collect words: $words = array(); $words[] = 'The'; if ($fox->getAttributes()) { $words[] = $fox->getAttributes(); } $words[] = $fox->getSpecies(); $words[] = Animal::jump(); $words[] = 'over'; $words[] = 'the'; if ($dog->getAttributes()) { $words[] = $dog->getAttributes(); } $words[] = $dog->getSpecies(); # Concatenate words and output sentence: $sentence = false; include 'build_sentence.php'; echo $sentence, PHP_EOL;