3v4l.org

run code in 200+ php & hhvm versions
<?php $filePath = 'missing_file'; $realFilePath = realpath($filePath); $fileInfo = new SplFileInfo($realFilePath); var_dump($fileInfo->getRealPath());
based on Od1Ed
Output for 7.1.25 - 7.3.2
string(1) "/"