[{"data":1,"prerenderedAt":569},["ShallowReactive",2],{"navigation":3,"/getting-started/why-a-new-version":114,"/getting-started/why-a-new-version-surround":564},[4,31,83],{"title":5,"_path":6,"children":7},"Getting Started","/getting-started",[8,10,13,16,19,22,25,28],{"title":9,"_path":6},"Introduction",{"title":11,"_path":12},"Why a new FakerPHP ?","/getting-started/why-a-new-version",{"title":14,"_path":15},"Usage","/getting-started/usage",{"title":17,"_path":18},"Frameworks","/getting-started/integrations",{"title":20,"_path":21},"Package Development","/getting-started/package-development",{"title":23,"_path":24},"Strategies","/getting-started/strategies",{"title":26,"_path":27},"Modifiers","/getting-started/modifiers",{"title":29,"_path":30},"Custom Extension","/getting-started/custom-extension",{"title":32,"_path":33,"children":34},"Extensions","/extensions",[35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80],{"title":36,"_path":37},"Array","/extensions/array",{"title":39,"_path":40},"Boolean","/extensions/boolean",{"title":42,"_path":43},"Colors","/extensions/colors",{"title":45,"_path":46},"Currencies","/extensions/currencies",{"title":48,"_path":49},"DateTime","/extensions/datetime",{"title":51,"_path":52},"Files","/extensions/files",{"title":54,"_path":55},"Financial","/extensions/financial",{"title":57,"_path":58},"Geographical","/extensions/geographical",{"title":60,"_path":61},"Hash","/extensions/hash",{"title":63,"_path":64},"Images","/extensions/images",{"title":66,"_path":67},"Internet","/extensions/internet",{"title":69,"_path":70},"Numbers","/extensions/numbers",{"title":72,"_path":73},"Person","/extensions/person",{"title":75,"_path":76},"Phone","/extensions/phone",{"title":78,"_path":79},"Strings","/extensions/strings",{"title":81,"_path":82},"Text","/extensions/text",{"title":84,"_path":85,"children":86},"Locales","/locales",[87,90,93,96,99,102,105,108,111],{"title":88,"_path":89},"German (Germany)","/locales/de-de",{"title":91,"_path":92},"English (United Kingdom)","/locales/en-gb",{"title":94,"_path":95},"English (India)","/locales/en-in",{"title":97,"_path":98},"English (Pakistan)","/locales/en-pk",{"title":100,"_path":101},"English (United States)","/locales/en-us",{"title":103,"_path":104},"Spanish (Spain)","/locales/es-es",{"title":106,"_path":107},"French (Belgium)","/locales/fr-be",{"title":109,"_path":110},"French (Switzerland)","/locales/fr-ch",{"title":112,"_path":113},"French (France)","/locales/fr-fr",{"_path":12,"_dir":115,"_draft":116,"_partial":116,"_locale":117,"title":11,"description":118,"body":119,"_type":558,"_id":559,"_source":560,"_file":561,"_stem":562,"_extension":563},"getting-started",false,"","The genesis of the project",{"type":120,"children":121,"toc":544},"root",[122,130,135,140,147,154,294,298,304,309,355,358,364,371,383,389,408,414,419,452,458,470,476,492,495,501],{"type":123,"tag":124,"props":125,"children":126},"element","p",{},[127],{"type":128,"value":129},"text","An initial version of FakerPHP was created in 2011 and was very well received by the community. However, the maintainer “sunset” the project in 2020 for various reasons outlined here.",{"type":123,"tag":124,"props":131,"children":132},{},[133],{"type":128,"value":134},"Since then, the project has been forked, but that fork has not been maintained either and is rarely used.",{"type":123,"tag":124,"props":136,"children":137},{},[138],{"type":128,"value":139},"We therefore decided to rebuild the package from scratch to better meet the needs of modern development and to ensure the package’s long-term maintenance.",{"type":123,"tag":141,"props":142,"children":144},"h1",{"id":143},"why-a-new-fakerphp",[145],{"type":128,"value":146},"Why a new FakerPHP?",{"type":123,"tag":148,"props":149,"children":151},"h2",{"id":150},"key-improvements",[152],{"type":128,"value":153},"Key improvements",{"type":123,"tag":155,"props":156,"children":157},"table",{},[158,182],{"type":123,"tag":159,"props":160,"children":161},"thead",{},[162],{"type":123,"tag":163,"props":164,"children":165},"tr",{},[166,172,177],{"type":123,"tag":167,"props":168,"children":169},"th",{},[170],{"type":128,"value":171},"Feature",{"type":123,"tag":167,"props":173,"children":174},{},[175],{"type":128,"value":176},"Old Faker",{"type":123,"tag":167,"props":178,"children":179},{},[180],{"type":128,"value":181},"FakerPHP",{"type":123,"tag":183,"props":184,"children":185},"tbody",{},[186,205,223,241,258,276],{"type":123,"tag":163,"props":187,"children":188},{},[189,195,200],{"type":123,"tag":190,"props":191,"children":192},"td",{},[193],{"type":128,"value":194},"Image generation",{"type":123,"tag":190,"props":196,"children":197},{},[198],{"type":128,"value":199},"Broken, online",{"type":123,"tag":190,"props":201,"children":202},{},[203],{"type":128,"value":204},"Working, local, offline",{"type":123,"tag":163,"props":206,"children":207},{},[208,213,218],{"type":123,"tag":190,"props":209,"children":210},{},[211],{"type":128,"value":212},"Package size",{"type":123,"tag":190,"props":214,"children":215},{},[216],{"type":128,"value":217},"3.3 MB",{"type":123,"tag":190,"props":219,"children":220},{},[221],{"type":128,"value":222},"33 KB",{"type":123,"tag":163,"props":224,"children":225},{},[226,231,236],{"type":123,"tag":190,"props":227,"children":228},{},[229],{"type":128,"value":230},"Modularity",{"type":123,"tag":190,"props":232,"children":233},{},[234],{"type":128,"value":235},"Monolithic",{"type":123,"tag":190,"props":237,"children":238},{},[239],{"type":128,"value":240},"Modular, extensible",{"type":123,"tag":163,"props":242,"children":243},{},[244,248,253],{"type":123,"tag":190,"props":245,"children":246},{},[247],{"type":128,"value":32},{"type":123,"tag":190,"props":249,"children":250},{},[251],{"type":128,"value":252},"Static",{"type":123,"tag":190,"props":254,"children":255},{},[256],{"type":128,"value":257},"Runtime, can be project-specific",{"type":123,"tag":163,"props":259,"children":260},{},[261,266,271],{"type":123,"tag":190,"props":262,"children":263},{},[264],{"type":128,"value":265},"Autocompletion",{"type":123,"tag":190,"props":267,"children":268},{},[269],{"type":128,"value":270},"Limited",{"type":123,"tag":190,"props":272,"children":273},{},[274],{"type":128,"value":275},"Dynamic, IDE-friendly",{"type":123,"tag":163,"props":277,"children":278},{},[279,284,289],{"type":123,"tag":190,"props":280,"children":281},{},[282],{"type":128,"value":283},"Randomizer",{"type":123,"tag":190,"props":285,"children":286},{},[287],{"type":128,"value":288},"Legacy",{"type":123,"tag":190,"props":290,"children":291},{},[292],{"type":128,"value":293},"PHP 8 native",{"type":123,"tag":295,"props":296,"children":297},"hr",{},[],{"type":123,"tag":148,"props":299,"children":301},{"id":300},"the-problem-with-the-original-faker",[302],{"type":128,"value":303},"The problem with the Original Faker",{"type":123,"tag":124,"props":305,"children":306},{},[307],{"type":128,"value":308},"The original Faker library has been a staple for generating fake data in PHP projects for years. However, over time, several pain points became impossible to ignore:",{"type":123,"tag":310,"props":311,"children":312},"ul",{},[313,325,335,345],{"type":123,"tag":314,"props":315,"children":316},"li",{},[317,323],{"type":123,"tag":318,"props":319,"children":320},"strong",{},[321],{"type":128,"value":322},"Broken features",{"type":128,"value":324},": Some functionalities, like image generation, were simply not working. The documentation even admitted it!",{"type":123,"tag":314,"props":326,"children":327},{},[328,333],{"type":123,"tag":318,"props":329,"children":330},{},[331],{"type":128,"value":332},"Bloat",{"type":128,"value":334},": The package size ballooned to 3.3 MB, making it heavy for modern projects.",{"type":123,"tag":314,"props":336,"children":337},{},[338,343],{"type":123,"tag":318,"props":339,"children":340},{},[341],{"type":128,"value":342},"Lack of modularity",{"type":128,"value":344},": Adding or customizing data generators was cumbersome and not project-friendly.",{"type":123,"tag":314,"props":346,"children":347},{},[348,353],{"type":123,"tag":318,"props":349,"children":350},{},[351],{"type":128,"value":352},"Outdated randomizer",{"type":128,"value":354},": It relied on older random generation methods, missing out on the improvements brought by PHP 8.",{"type":123,"tag":295,"props":356,"children":357},{},[],{"type":123,"tag":148,"props":359,"children":361},{"id":360},"how-this-version-solves-these-issues",[362],{"type":128,"value":363},"How this version solves these issues",{"type":123,"tag":365,"props":366,"children":368},"h3",{"id":367},"_1-image-generation-that-actually-works",[369],{"type":128,"value":370},"1. Image generation that actually works",{"type":123,"tag":124,"props":372,"children":373},{},[374,376,381],{"type":128,"value":375},"FakerPHP provides ",{"type":123,"tag":318,"props":377,"children":378},{},[379],{"type":128,"value":380},"fully functional image generation",{"type":128,"value":382},", even offline. Whether you’re on a train, in a plane, or just without internet, you can generate placeholder images locally — no external dependencies, no surprises.",{"type":123,"tag":365,"props":384,"children":386},{"id":385},"_2-tiny-footprint",[387],{"type":128,"value":388},"2. Tiny footprint",{"type":123,"tag":124,"props":390,"children":391},{},[392,394,399,401,406],{"type":128,"value":393},"We’ve reduced the package size from ",{"type":123,"tag":318,"props":395,"children":396},{},[397],{"type":128,"value":398},"3.3 MB to just 33 KB",{"type":128,"value":400},". That’s a ",{"type":123,"tag":318,"props":402,"children":403},{},[404],{"type":128,"value":405},"99% reduction",{"type":128,"value":407}," in size, making FakerPHP lightning-fast to install and ideal for any project, big or small.\nTo do this, we simply included the most essential features in the base package and created extensions for the features that developers use the least, which are often quite specific.\nLanguages are also extensions, so you can download only the ones you need.",{"type":123,"tag":365,"props":409,"children":411},{"id":410},"_3-modular-and-extensible",[412],{"type":128,"value":413},"3. Modular and extensible",{"type":123,"tag":124,"props":415,"children":416},{},[417],{"type":128,"value":418},"FakerPHP is built with modularity in mind. You can:",{"type":123,"tag":310,"props":420,"children":421},{},[422,432,442],{"type":123,"tag":314,"props":423,"children":424},{},[425,430],{"type":123,"tag":318,"props":426,"children":427},{},[428],{"type":128,"value":429},"Create extensions on the fly",{"type":128,"value":431}," for your project’s specific needs.",{"type":123,"tag":314,"props":433,"children":434},{},[435,440],{"type":123,"tag":318,"props":436,"children":437},{},[438],{"type":128,"value":439},"Instantiate extensions at runtime",{"type":128,"value":441},", so your fake data generators are always tailored to your context.",{"type":123,"tag":314,"props":443,"children":444},{},[445,450],{"type":123,"tag":318,"props":446,"children":447},{},[448],{"type":128,"value":449},"Auto-discover extensions",{"type":128,"value":451},", so you don’t have to manually register them.",{"type":123,"tag":365,"props":453,"children":455},{"id":454},"_4-dynamic-autocompletion",[456],{"type":128,"value":457},"4. Dynamic autocompletion",{"type":123,"tag":124,"props":459,"children":460},{},[461,463,468],{"type":128,"value":462},"Say goodbye to guessing method names. FakerPHP offers ",{"type":123,"tag":318,"props":464,"children":465},{},[466],{"type":128,"value":467},"dynamic autocompletion",{"type":128,"value":469}," in your IDE, so you can discover and use available data generators with ease.",{"type":123,"tag":365,"props":471,"children":473},{"id":472},"_5-php-8-randomizer",[474],{"type":128,"value":475},"5. PHP 8 Randomizer",{"type":123,"tag":124,"props":477,"children":478},{},[479,481,490],{"type":128,"value":480},"FakerPHP leverages ",{"type":123,"tag":482,"props":483,"children":487},"a",{"href":484,"rel":485},"https://www.php.net/manual/en/class.random-randomizer.php",[486],"nofollow",[488],{"type":128,"value":489},"PHP 8’s new randomizer",{"type":128,"value":491},", bringing you better performance, more reliable randomness, and all the benefits of modern PHP.",{"type":123,"tag":295,"props":493,"children":494},{},[],{"type":123,"tag":148,"props":496,"children":498},{"id":497},"why-to-choose-this-fakerphp",[499],{"type":128,"value":500},"Why to choose this FakerPHP?",{"type":123,"tag":310,"props":502,"children":503},{},[504,514,524,534],{"type":123,"tag":314,"props":505,"children":506},{},[507,512],{"type":123,"tag":318,"props":508,"children":509},{},[510],{"type":128,"value":511},"Reliability",{"type":128,"value":513},": No more broken features or undocumented limitations.",{"type":123,"tag":314,"props":515,"children":516},{},[517,522],{"type":123,"tag":318,"props":518,"children":519},{},[520],{"type":128,"value":521},"Performance",{"type":128,"value":523},": Tiny size, fast installation, and efficient runtime.",{"type":123,"tag":314,"props":525,"children":526},{},[527,532],{"type":123,"tag":318,"props":528,"children":529},{},[530],{"type":128,"value":531},"Flexibility",{"type":128,"value":533},": Extend and customize FakerPHP to fit your project’s unique requirements.",{"type":123,"tag":314,"props":535,"children":536},{},[537,542],{"type":123,"tag":318,"props":538,"children":539},{},[540],{"type":128,"value":541},"Modern Tooling",{"type":128,"value":543},": Built for PHP 8, with all the latest improvements and up to date with your favorite framework.",{"title":117,"searchDepth":545,"depth":545,"links":546},2,[547,548,549,557],{"id":150,"depth":545,"text":153},{"id":300,"depth":545,"text":303},{"id":360,"depth":545,"text":363,"children":550},[551,553,554,555,556],{"id":367,"depth":552,"text":370},3,{"id":385,"depth":552,"text":388},{"id":410,"depth":552,"text":413},{"id":454,"depth":552,"text":457},{"id":472,"depth":552,"text":475},{"id":497,"depth":545,"text":500},"markdown","content:1.getting-started:2.why-a-new-version.md","content","1.getting-started/2.why-a-new-version.md","1.getting-started/2.why-a-new-version","md",[565,567],{"_path":6,"title":9,"description":566},"Welcome to Faker's enhanced PHP library.",{"_path":15,"title":14,"description":568},"Get started with Faker PHP.",1776884246377]