test-helper.php

#!/usr/bin/env php5
<?php
require 'class.helper.phps';

$arr = array(
	'test',
	'test.1',
	'test.1.2',
	'test..1',
	'test.1.',
	'test.1..',
	0,
	1,
	false,
	true,
);

$width = max(array_map('strlen', array_values($arr)));
#echo str_pad('Name:', $width).'Extension:'.PHP_EOL;
fwrite( STDOUT, "\033[1m" . str_pad('Name', $width) . 'Extension' . "\033[0m" . PHP_EOL . PHP_EOL );
foreach($arr as $row) {
	#echo str_pad($row, max(array_map('strlen', array_values($arr)))).PHP_EOL;
	#echo str_pad($row, max(array_map('strlen', array_values($arr)))).': '.Helper::getFileExtension($row).PHP_EOL;
	fwrite( STDOUT, str_pad($row, $width) . ': ' . Helper::getFileExtension($row) . PHP_EOL );
}