<?php
$rc = new ReflectionClass('Exception');
$rps = $rc->getConstructor()->getParameters();
foreach ($rps as $rp) {
echo '$', $rp->getName(), PHP_EOL;
echo "\t isOptional : ", var_export($rp->isOptional(), true), PHP_EOL;
echo "\t isDefaultValueAvailable : ", var_export($rp->isDefaultValueAvailable(), true), PHP_EOL;
if ($rp->isDefaultValueAvailable()) {
echo "\t getDefaultValue : ", var_export($rp->getDefaultValue(), true), PHP_EOL;
}
echo PHP_EOL, PHP_EOL;
}
preferences:
98.44 ms | 402 KiB | 5 Q