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