Skip to content

Instantly share code, notes, and snippets.

@auroraeosrose
Last active August 29, 2015 14:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save auroraeosrose/ba4a1d00c93bb3910b5c to your computer and use it in GitHub Desktop.
Save auroraeosrose/ba4a1d00c93bb3910b5c to your computer and use it in GitHub Desktop.
Braindump - Things I'd like to fix or see fixed in PHP $NEXT (6 or 7)
  1. Streams: PHP streams have some major issues - notifications not finished, the horrid http layer (can we PLEASE use a library?), object/class integration, filters and the filter api make people cry, horrific error handling - noise for noise sake and no way to retrieve useful errors and warnings, no curl wrapper anymore, internal api for the implementation is sad
  2. Extensions: some pecl <-> php swaps, all internal extensions MUST have ACTIVE maintainers or get punted, some OO apis for older extensions and killing some non useful (looking at you odbc) functionality, better test coverage of extensions
  3. Enums: either in spl or in core, an enum object for C style enums (or enums as a zval type, either works for me) - this is highly difficult to implement in userland, in ext/core you can make it act like an int with Moar features
  4. Unicode: a unicode string class - yes yes ugly in some ways, but could hold a wchar_t and char * cached of utf8, always act in utf8 when used a string in the majority of PHP cases, and have the ability for extensions and core to grab the wchar_t for cases where internal C/CPP apis need it
  5. ZPP: a flag to trigger exceptions instead of errors to avoid boilerplate, apis for throwing errors/exceptions identical to ZPP for enhanced parsing, some greater standarization in usage, either/or parsing for overloading simple use cases
  6. PDO: pdo has some major bugs and needs some major love
  7. Modules: better apis that are less macro and abstract out common engine usage (so engine can really be drag and drop)
  8. Lexer: this is a long shot, but the ability to "hook" the lexer as you can the parser with an extension would be really awesome
  9. cmake: really long shot, but cmake is so much easier to deal with than autotools and far more cross platform - not that it solves all problems but even providing a phpize system for cmake would be great
  10. http/std split: another long shot, but moving all the http stuff into an http_ or even HTTP namespace with logical names would help clean out core a bit, could also add some additional http handling functionality
  11. intl/iconv/mbstring: we don't need three!! extensions that do basically the same thing - move the missing iconv functionality (streams) and the missing mbstring functionality (zend multibyte, some functionality) into intl and boot the other two, plus finish implementing all of icu functionality in intl (tied possibly to unicode object and definitely to extension work)
  12. embedded lib support: either as extension or maybe even core, tools for doing .rc/elf section embedding of PHP scripts for python style PHP wrappers over ugly php extensions
  13. fix libffi and core it (that makes me owie already)
  14. jmalloc/tcmalloc pluggable implementations
  15. gtest/unit/cmocka compiled unit test
  16. test .exe for embeddable sapi built
  17. run-test fix for path in spaces and multiple sapis
  18. Internal serializer interface to permit PHP, JSON, igbinary etc serializers to be pluggable
  19. kill as much use of resources in PHP as possible - ugly ugly things that objects do the same or better
  20. ZPP return on failure - some return null, some false - there should be a standard - now is the time to break it!
@jwoodcock
Copy link

11 and 17 are suppose to be entry-level tasks. I will take a look at them and see if I can help.

@auroraeosrose
Copy link
Author

yup - 11 is entry level C/PHP internals (talk to mgdm about it, I think he did part of it? don't quote me)
17 is entry level php - just do some unstupiding of the test runners (also possibly sync server-tests.php?)

@manchuck
Copy link

for #11, I went through the functions for mbstring and iconv. Here are new classes I think will be needed:

IntlString: Holds the mb_str* functions as well as mb_parse_str
IntlRegex: holds the regex (should we include the eregi functions as well?)
IntlEncode: holds the mb_decode_, mb_encode_ and inconv_mime*

Hope im on the right path with this

@auroraeosrose
Copy link
Author

most of the mb_str stuff exists in one form or another in the grapheme stuff - although shortcuts for toupper and tolower would be nice - I think there's regex somewhere in icu - that should be used - the encode and decode is all done in uconvertor - the big thing intl is missing is zend_multibyte support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment