1--TEST--
2SPL: SplFileInfo::getExtension() basic test
3--FILE--
4<?php
5$file = md5('SplFileInfo::getExtension');
6$exts = array('.txt', '.extension', '..', '.', '');
7foreach ($exts as $ext) {
8    touch($file . $ext);
9    $info = new SplFileInfo($file . $ext);
10    var_dump($info->getExtension(), pathinfo($file . $ext, PATHINFO_EXTENSION));
11}
12?>
13--CLEAN--
14<?php
15$file = md5('SplFileInfo::getExtension');
16$exts = array('.txt', '.extension', '..', '.', '');
17foreach ($exts as $ext) {
18    unlink($file . $ext);
19}
20?>
21--EXPECTF--
22string(3) "txt"
23string(3) "txt"
24string(9) "extension"
25string(9) "extension"
26string(0) ""
27string(0) ""
28string(0) ""
29string(0) ""
30string(0) ""
31string(0) ""
32