THE ICONIC Name Parser

Universal, language-independent PHP library that splits full names into meaningful parts.

Library
Composer
vv1.2.11
135stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
41/100Fair
Development Activity0
Maintenance20
Community72
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture78
Code Quality80
Innovation62
Learning Curve90

THE ICONIC Name Parser is a universal, language-independent PHP library that takes a single string containing a full name — potentially with a salutation, initials, middle names, and suffixes — and splits it into meaningful parts such as first name, last name, initials, salutation, and suffix. For example, “Mr Anthony R Von Fange III” is parsed into salutation “Mr.”, first name “Anthony”, initials “R”, last name “von Fange”, and suffix “III”.

It is tailored primarily to English names but works well with non-English names using Latin spelling, handling patterns with and without commas. The library has been used in production by The Iconic for years, successfully processing hundreds of thousands of real customer names.

What You Get

  • A Parser that turns a full-name string into a structured Name object
  • Accessors for salutation, first name, middle name, last name, initials, nickname, and suffix
  • Handling of both natural order and comma-separated last-name-first formats
  • Recognition of common salutations, suffixes, and last-name prefixes (van, von, de, etc.)
  • Configurable and extensible mapping of salutations and suffixes
  • A proven, production-tested parser used on hundreds of thousands of names

Common Use Cases

  • Normalizing imported customer or contact names into structured fields
  • Personalizing communications by extracting a usable first name
  • Cleaning and standardizing name data during ETL or migration
  • Splitting single name inputs into database columns for CRM systems

Under The Hood

Architecture - The parser is built as a pipeline of small, single-responsibility Part classes (Salutation, Firstname, Lastname, Initial, Nickname, Suffix, and so on) coordinated by a Parser and a Mapper layer. The input string is tokenized, each token is classified by matching against configurable salutation/suffix/prefix maps and heuristics, and the classified parts are assembled into an immutable Name value object exposing typed getters.

Tech Stack - Pure PHP (100% of the codebase) with PSR-4 autoloading under the TheIconic\NameParser namespace and no runtime dependencies. Development tooling historically included PHPUnit, Travis CI, Coveralls, and Scrutinizer for quality gating.

Code Quality - The project advertises strong test coverage and code-quality scores from its CI badges and has been production-hardened on very large real-world datasets. The class-per-part design keeps individual pieces small and testable, though the repository is now in an inactive, low-maintenance state.

API Design - Usage is minimal: instantiate Parser, call parse() with a name string, and read structured getters like getFirstname() and getLastname() off the returned Name object. Salutation and suffix maps can be customized, but the default path requires no configuration.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search