PHPAB(1)

πŸ“¦
version 1.29.4 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– PHPAB(1) β€” the phpab glow-up πŸ’–

okay bestie, gather round, because this is the phpab command line interface manual β€” it lives in the User Commands corner of your manual pages (you know, section 1, where all the main character binaries hang out) 🌸. It's giving ✨autoloader generator energy✨ and honestly? we're obsessed.


✨ SYNOPSIS ✨

phpab [switches] <directory1|file1|/path/to/composer.json>
[...<directoryN|fileN>]

like, you hand it a directory, or a file, or a whole composer.json β€” and you can keep stacking more of them, no cap 🫢


🌈 DESCRIPTION 🌈

phpab %development% - Copyright (C) 2009 - 2025 by Arne Blankerts and Contributors

periodt. that's the line, we keep it exactly πŸ’… and now, the flags, because there are thirty-six of them and every single one is coming with us 😭


πŸŽ€ OPTIONS πŸŽ€

  • -i, --include β€” the file pattern you wanna include (default: *.php) β€” yes babe, default is literally *.php πŸ“
  • -e, --exclude β€” the file pattern you wanna exclude πŸ™ˆ
  • --blacklist β€” blacklist a classname or namespace (wildcards supported, so go feral with *) ⭐
  • --whitelist β€” whitelist a classname or namespace (wildcards supported too, iykyk) πŸ‘‘
  • -b, --basedir β€” the basedir for filepaths, so your paths stop being dramatic πŸ¦‹
  • -t, --template β€” path to the code template you wanna use 🧚
  • -o, --output β€” output file for the generated code (default: STDOUT, so it just yells into your terminal πŸ’€)
  • -p, --phar β€” create a phar archive (requires -o, bestie, it needs somewhere to go) πŸ”₯
  • --all β€” include all files in the given directory when creating a phar 🫢
  • --alias β€” specify an explicit internal phar alias filename (default: the output filename) ✨
  • --hash β€” force a given hash algorithm (SHA-1, SHA-256 or SHA-512) (requires -p, and it conflicts with --key β€” pick a lane πŸ’…)
  • --bzip2 β€” compress the phar archive using bzip2 (requires -p) (bzip2 required, like, actually required) 🌸
  • --gzip β€” compress the phar archive using gzip (requires -p) (gzip required) πŸ“
  • --key β€” OpenSSL key file to use for signing the phar archive (requires -p) (openssl required) πŸ”
  • -c, --compat β€” generate PHP 5.2 compatible code (yes, we're time traveling, slay) ⏳
  • -s, --static β€” generate a static require file πŸ’–
  • -w, --warm β€” generate a static opcache warming file πŸ”₯
  • --reset β€” add an opcache reset call when generating the opcache warming file ♻️
  • -1, --prepend β€” register as the first autoloader (prepend to the stack; default: append) πŸ‘‘
  • -d, --no-exception β€” do not throw an exception on a registration problem (default: throw exception β€” so by default it's gonna scream, be warned 😭)
  • -n, --nolower β€” do not lowercase classnames for case insensitivity πŸ™ˆ
  • -q, --quiet β€” quiet mode, do not output any processing errors or information 🀫
  • --cache <file> β€” enable caching and set the filename to use for cache storage πŸ—‚οΈ
  • --follow β€” enables following symbolic links (not compatible with phar mode β€” fr fr, don't) πŸ”—
  • --format β€” dateformat string for the timestamp πŸ—“οΈ
  • --linebreak β€” linebreak style (CR, CRLF or LF, default: LF) πŸ’…
  • --indent β€” string used for indenting, or a number of spaces (default: 16 (compat 12) spaces) πŸ“
  • --tolerant β€” ignore class redeclarations in the same file 🫢
  • --once β€” use require_once instead of require when creating a static require file ✨
  • --trusting β€” do not check the mimetype of files prior to parsing (this is the default) 😌
  • --paranoid β€” do check the mimetype of files prior to parsing πŸ•΅οΈ
  • --var name=foo β€” assign the value foo to the variable name, to be used in (custom) templates πŸŽ€
  • --lint β€” run lint on the generated code and exit 🧼
  • --lint-php β€” PHP binary to use for linting (default: /usr/bin/php or c:\php\php.exe) 🐘
  • -h, --help β€” prints this usage information πŸ₯°
  • -v, --version β€” prints the version and exits πŸ‘‹
ngl bestie, if you pass --hash and --key together, that's a conflict β€” the manual says so, and we respect the manual πŸ’€

and that's the whole vibe check, we ate and left no crumbs πŸ’–βœ¨ version phpab 1.29.4, dated December 2025, byeeee πŸ¦‹πŸ’…

πŸ“¦ where this page comes from