- define: documentation ( source)
<?php
namespace {
define('SOME_CONSTANT', 1);
}
namespace Some\Name\Space {
use ReflectionFunction;
$reflection = new ReflectionFunction(function ($const = \PHP_EOL, $const2 = \SOME_CONSTANT) {
});
echo $reflection->getParameters()[0]->getDefaultValueConstantName() . PHP_EOL;
echo $reflection->getParameters()[1]->getDefaultValueConstantName() . PHP_EOL;
}