function test_detection in geoPHP 8
Same name and namespace in other branches
- 7 geoPHP/tests/test.php \test_detection()
File
- geoPHP/
tests/ test.php, line 260 - Uncomment to test.
Code
function test_detection($value, $format, $file) {
$detected = geoPHP::detectFormat($value);
if ($detected != $format) {
if ($detected) {
print 'detected as ' . $detected . "\n";
}
else {
print "not detected\n";
}
}
// Make sure it loads using auto-detect.
geoPHP::load($value);
}