My question is pretty close to QR Code Generator Library (no web service) – just for PHP instead of .NET: I want a small, light-weight PHP "library" (ideally a compact class) to generate QR Codes, mostly for texts. It shall not use any web services, but generate the codes on-site.
Requirements
- free and open source (FOSS/FLOSS)
- small and light-weight (ideally a single class file with max 50kiB)
- the "simple" from the title meaning: install via copy-the-file(s) must be possible – not e.g. requiring composer with 10 dependencies. Best no dependencies at all (except for "built-in"/ships-with-PHP, like
php-gd
to create/manipulate graphics) - not using web services (local generation; can use e.g. php-gd to generate images)
- supports at least encoding text and URLs
- supports at least PHP 7+
Nice to have (but not strictly required)
- supporting other types, like VCards, calendar entries
- embedding logos (to make a QR code easier to identify visibly)
- setting foreground/background colors (if not possible, black on white is OK)
- setting size (could be done afterwards – but it's easier if supported directly)
- small resulting file size
- actively maintained (so support for future PHP versions has a chance)
- available at Github, GitLab or Codeberg, ideally incl. issue tracker (for support, feedback and possible contributions)
Not needed
- fancy stuff like crazy coloring or rotating QR cubes with sound (you know what I mean: KISS principle)