Update of "FeatureComparison"
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Artifact ID: | 979cde52ced37195ce4daba5685d8edf82a7af1f |
---|---|
Page Name: | FeatureComparison |
Date: | 2014-09-02 18:34:26 |
Original User: | mario |
Mimetype: | text/x-markdown |
Parent: | a8d2b352b07b2f404618255a5ecd9958a88ca808 (diff) |
Next | 9eb2a4de0db7232aefc06b97ac615298b8c9214b |
Let me just preface this with: inconclusive conventions are better than no standards at all. And there's probably nothing newsworthy here.
Due to the ellipses in the PSR-x documents it's however helpful to detail some technical deviations and oversights.
Feature | PHP | PSR-0 | PSR-4 | shared |
---|---|---|---|---|
Class autoloading | โ | โ | โ | โ |
Zero configuration | โ | โโ | โโ | โ |
Multiple class declarations per script | โ | โโยน | โโยน | โ |
Namespace support | โ | โ | โ | โ |
Multiple namespaces per file | โ | โโ | โโ | โ |
Syntax verification | โ | โโ | โโ | โ |
Specific underscore treatment | โ | โโ | โโ | โ |
Case-insensitive class identifiers ยฒ | โ | โโ | โโยฒ | โ |
Function names | โ | โฟ/โ | โฟ/โ | โ |
Case-variant constants | โ | โฟ/โ | โโฟ/โ | โ |
Phar package support | โ | โโยณ | โโ | โ |
Versioned bundles โด | โ | โโ | โโ | โ |
1 = Impractical, but symlinking dependency-conjoined class modules might be a feasible workaround.
2 = Not just accidentally on some plattforms or filesystems.
3 = While prohibited, most PSR-0 autoloaders work with handicrafted phar:// paths in their namespace registry.
4 = Not a discreet PHP or Phar feature, and resolving dependencies is certainly still best left with composer, not done at runtime.
Origin of PSR-0/4
PSR-4 inherits the PSR-0 design as intended for and from PHP framework maintainers. Retaining the traditional class directory structures was the protogenic goal then. PSR-4 constitutively just removed the PEAR-style name splitting.
Which is where the plattform ambiguity due to absent identifier-to-file case normalization issues from. Holding on to the handed down file structuring schemes is also why namespaces were interpreted as PHP 5.3s only significant addition, but Phar support disregarded.