realpath olnly works on filesystem. see https://bugs.php.net/bug.php?id=52769