Revert "Fix var_export() not working for stdClass in PHP < 7.3"

This reverts commit 3f7f802585.
This commit is contained in:
Kijin Sung 2018-12-13 18:59:27 +09:00
parent 7e48c4989e
commit 7b9fe8f7f2
8 changed files with 43 additions and 40 deletions

View file

@ -409,22 +409,6 @@ function url2path($url)
return Rhymix\Framework\URL::toServerPath($url);
}
/**
* This function fixes some of the issues with var_export() so that the result executes cleanly.
*
* @param mixed $var
* @return string
*/
function var_export_clean($var)
{
$result = var_export($var, true);
if (version_compare(PHP_VERSION, '7.3', '<'))
{
$result = preg_replace('/stdClass::__set_state\((?=array\(\n)/', '(object)(', $result);
}
return $result;
}
/**
* Convert hexadecimal color codes to an array of R, G, B values.
* This function can handle both 6-digit and 3-digit notations, optionally prefixed with '#'.