You are here

protected static function PHPUnit_Util_GlobalState::exportVariable in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit/src/Util/GlobalState.php \PHPUnit_Util_GlobalState::exportVariable()
3 calls to PHPUnit_Util_GlobalState::exportVariable()
PHPUnit_Util_GlobalState::getConstantsAsString in vendor/phpunit/phpunit/src/Util/GlobalState.php
PHPUnit_Util_GlobalState::getGlobalsAsString in vendor/phpunit/phpunit/src/Util/GlobalState.php
PHPUnit_Util_GlobalState::getIniSettingsAsString in vendor/phpunit/phpunit/src/Util/GlobalState.php

File

vendor/phpunit/phpunit/src/Util/GlobalState.php, line 162

Class

PHPUnit_Util_GlobalState
@since Class available since Release 3.4.0

Code

protected static function exportVariable($variable) {
  if (is_scalar($variable) || is_null($variable) || is_array($variable) && self::arrayOnlyContainsScalars($variable)) {
    return var_export($variable, true);
  }
  return 'unserialize(' . var_export(serialize($variable), true) . ')';
}