9    __DIR__ . 
'/../vendor/autoload.php',  
 
   10    __DIR__ . 
'/../../../autoload.php',   
 
   14    if (file_exists(
$path)) {
 
   20if (!class_exists(
'Sabre\\VObject\\Version')) {
 
   21    fwrite(STDERR, 
"Composer autoloader could not be loaded.\n");
 
   30    echo 
"Usage: ", 
$argv[0], 
" input.vcf output.vcf [debug.log]\n";
 
   57    "No FN property"     => 0,
 
   58    "Ignored duplicates" => 0,
 
   69        echo str_pad(
$name, 23, 
" ", STR_PAD_RIGHT), str_pad($value, 6, 
" ", STR_PAD_LEFT), 
"\n";
 
   72    echo 
"\033[" . count(
$stats) . 
"A";
 
   81    fwrite(
$output, $vcard->serialize() . 
"\n");
 
   90    $fn = isset($vcard->FN) ? (string)$vcard->FN : 
null;
 
   95        $stats[
"No FN property"]++;
 
  113        foreach ($vcard->children() as $newProp) {
 
  122                if ($compareProp->serialize() === $newProp->serialize()) {
 
  130                if ($newProp->name === 
'EMAIL' || $newProp->name === 
'TEL') {
 
  137                        if ($compareProp->getValue() === $newProp->getValue()) {
 
  148                        $stats[
'Merged values']++;
 
  160                if (
$debug) fwrite(
$debug, 
"Missing '" . $newProp->name . 
"' property in duplicate. Earlier vcard:\n" . 
$collectedNames[$fn]->serialize() . 
"\n\nLater:\n" . $vcard->serialize() . 
"\n\n");
 
  171    $stats[
'Ignored duplicates']++;
 
  184echo str_repeat(
"\n", count(
$stats)), 
"\nDone.\n";
 
An exception for terminatinating execution or to throw for unit testing.
const VERSION
Full version number.
foreach( $paths as $path) if(!class_exists( 'Sabre\\VObject\\Version'))
foreach($paths as $path) if($argc< 3) $input