I want just to declare
functions without the implementations. The implementations have to be in another file.
Is this possible and if so, is there some tricky in that? Is it common practice to do so? I'm curious because I'm coming from a C++.
Example:
----------------- declarations.php -----------
<?php
function first($name, $age);
function second($country);
?>
----------------- implementations.php -----------
<?php
include (declarations.php);
function first($name, $age)
{
// here is the implementation
}
function second($country)
{
// here is the other implementation
}
?>