I'm sure this is quite simple, but I haven't been able to work it out myself. Given the following code, and executing the test1main.php file, why doesn't the '3' get printed? All I get is 'const is' without the 3.
TIA 🙂
test1Main.php
<?php
include_once('test1Include.php');
include_once('test1Func.php');
test();
?>
test1Include.php
<?php
$const = 3;
?>
test1Func.php
<?php
function test() {
echo "const is {$const}";
}
?>