1--TEST--
2Test realpath() with relative paths
3--FILE--
4<?php
5$file_path = __DIR__;
6@mkdir("$file_path/realpath_basic4/home/test", 0777, true);
7@symlink("$file_path/realpath_basic4/home", "$file_path/realpath_basic4/link1");
8@symlink("$file_path/realpath_basic4/link1", "$file_path/realpath_basic4/link2");
9echo "1. " . realpath("$file_path/realpath_basic4/link2") . "\n";
10echo "2. " . realpath("$file_path/realpath_basic4/link2/test") . "\n";
11?>
12--CLEAN--
13<?php
14$file_path = __DIR__;
15unlink("$file_path/realpath_basic4/link2");
16unlink("$file_path/realpath_basic4/link1");
17rmdir("$file_path/realpath_basic4/home/test");
18rmdir("$file_path/realpath_basic4/home");
19rmdir("$file_path/realpath_basic4");
20?>
21--EXPECTF--
221. %s%erealpath_basic4%ehome
232. %s%erealpath_basic4%ehome%etest
24