function GlobalState::exportVariable
3 calls to GlobalState::exportVariable()
- GlobalState::getConstantsAsString in vendor/
phpunit/ phpunit/ src/ Util/ GlobalState.php - GlobalState::getGlobalsAsString in vendor/
phpunit/ phpunit/ src/ Util/ GlobalState.php - GlobalState::getIniSettingsAsString in vendor/
phpunit/ phpunit/ src/ Util/ GlobalState.php
File
-
vendor/
phpunit/ phpunit/ src/ Util/ GlobalState.php, line 256
Class
- GlobalState
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\UtilCode
private static function exportVariable(mixed $variable) : string {
if (is_scalar($variable) || $variable === null || is_array($variable) && self::arrayOnlyContainsScalars($variable)) {
return var_export($variable, true);
}
return 'unserialize(' . var_export(serialize($variable), true) . ')';
}