Parsing and formatting var_export() string
Your script is like a var_export()-var_dump() hybrid with flare (I've not come across highlight_string() before -- pretty cool).


I ran some more tests with a few samples that I had laying around and noticed that your code is having some difficulties accessing the written "resource" branch.  I tested with fopen($filename, 'r'); the var_export() evaluation of a resource is NULL and var_dump() returns resource(5) of type (stream).  Because your script is founded on var_export(), it will fail to dignify the resource type data, I think you [sh/c]ould remove that from your battery of checks.
Miscellaneous gotchas include:

['a =&gt; key' =&gt; 'something']


and

['multiline' =&gt; 'line1
line2']


These will break your regex-based parsing -- of course, the former is going to be a much less common occurrence versus the latter.
You can safely remove some useless declarations:


$Test = []; and $textvar = '';

As a general rule, I prefer to never use OR or AND in my conditional statements as a matter of consistency and as a means to avoid fringe precedence issues.
preg_replace("/^([ ]*)(.*)/m", '$1$1$2', $textvar); This pattern/function is over-performing.  It doesn't make any sense to pick up the second capture group, just to put it back down unaltered.  In fact, there is no need for capture groups or character classes for this task.  I will also recommend that you use a consistent pattern delimiter for all patterns in your script. A tilde is a good/popular choice because it shouldn't interfere with any of your patterns and will help to prevent any accidental typos and escaping problems elsewhere.  To double the leading whitespace on each line, just use this (there's no use doubling zero whitespaces, so match one-or-more with +):

preg_replace('~^ +~m', '$0$0', $textvar);

$textvarArr = preg_split("/\r\n|\n|\r/", $textvar) is more succinctly written as:

$textvarArr = preg_split("~\R~", $textvar)

Whenever I see preg_match() called inside of a loop so that replacement actions can be performed, this is a classic indicator that preg_replace_callback() should be called.

$textvarArr = preg_split("~\R~", $textvar);
foreach ($textvarArr as $key =&gt; $value) {
    preg_match('~=&gt;\\s(.*?),~', $value, $newvalue);
    if (!empty($newvalue)) {
        $newvalue[1]      = str_replace("'", "", $newvalue[1]);
        $typeval          = myGetType($newvalue[1]);
        $value            = str_replace("=&gt; ", "=&gt; " . $typeval . ': ', $value);
        $textvarArr[$key] = $value;
    }
}


can become:

$textvar = preg_replace_callback(
    "~ =&gt; \K\V+(?=,)~", 
    function ($m) {
        return myGetType(str_replace("'", "", $m[0])) . ": {$m[0]}";
    },
    $textvar
);
// then proceed with something like...
$textvarArr = preg_replace(["/\s*array\s\($/", "/\)(,)?$/", "/\s=&gt;\s$/"], [NULL, ']$1', ' =&gt; array ['], preg_split("~\R~", $textvar));

I've got to say that this looks a little dangerous...

if (substr($textvar, -1) == '[') {
    $textvar = str_replace("[", "[]", $textvar);
}


I mean, you are checking the final character, then doing a full text scan and replace operation.  This deserves a bit of double-checking.  Don't you only mean to close the final square brace? Maybe...

if (substr($textvar, -1) == '[') {
    $textvar .= "]";
}



I didn't get a chance to properly review (but it could probably use a little polish/simplifying):

$textvarArr = preg_replace(["/\s*array\s\($/", "/\)(,)?$/", "/\s=&gt;\s$/"], [NULL, ']$1', ' =&gt; array ['], preg_split("~\R~", $textvar));
$textvar    = join(PHP_EOL, array_filter(["array ["] + $textvarArr));


I ran our outputs on a diffchecker program to be sure that my script returns the exact same output as yours.

Overall, an interesting exercise, good job.