summits:pdmnotesmay09

This is an old revision of the document!


The below are notes taken at the developer meeting at php|tek in Chicago. None of the things below are decisions and if relevant items will be moved to the relevant todo pages.

Someone should fill in who actually attended.

Day 1

PHP 5.3

Last critical bug is the re2c one. A couple of hacks were proposed. Proper fix is to fix RE2C to not scan pass end of file - Someone is going to take a look and get a fix in. (Derick)

PHP 6.0

Unicode

PDO
  1. PDO would talk to the driver using UTF-8 or UTF-16 unless driver supports it natively. Add concept of a CLOB vs. BLOB. CLOB allows DB driver to specify UTF-8/UCS-2 - let the driver convert the columns as needed. UTF-16 is base for PHP6 so any db support will be passthrough.
  2. Put common (boilerplate) conversion code into core PDO.
  3. Connection charset vs. table charset vs. per-column charset - allow user to send charset if the two differ.
  4. Databases must have connection libraries that will do the character set conversions, but that would kick out earlier DB versions.
  5. Prepared statements - extending Binding API to allow charsets.

Sara and Wez will spec the changes, after that need a volunteer to implement.

Other
  1. RE2C parser needs to be fixed to support UTF-16. (Scott)
  2. $_SERVER[] data should stay binary, will be decoded at runtime operations. So $_SERVER['QUERY_STRING'] stays binary as well. Need to see if this breaks scripts or if they can live with the $_SERVER contents being converted via runtime_encoding. There was a proposal to selectively convert only certain parts of $_SERVER — we should wait and see which parts the people ask for the most and consider that. (Andrei)
  3. To get the raw request data use $_SERVER['QUERY_STRING'], $HTTP_RAW_POST_DATA, or filter extension. (Andrei)
  4. New encoding setting for cookies (unicode.cookie_encoding). Defaults to unicode.output_encoding, but can be changed by the user. setcookie() et al will use it to encode cookies on output and incoming cookie data will be decoded with this setting as well. (Andrei)
  5. header forces its parameters to be in ASCII charset (may have to revisit later)
  6. setrawcookie() takes only binary strings. (Andrei)
  7. session - needs SID (check raw data to get it) - force ASCII name (Ilia)
  8. When using JIT for $_SESSION and we have auto start enabled we'll need to make sure we touch the session file on RSHUTDOWN to ensure the atime of the file gets modified. (Ilia)
  9. Need to either deprecate SID constant or move it to call a function like we do with __FILE__ (Ilia)
  10. Filter needs to support both binary and unicode strings (David Coallier)
  11. Consider caching the charset convertors we open (last 3 or so).
  12. zend_attribute_format prints lots of false warnings for things it doesn't understand, we should just remove this
  13. integrate ICU date support into ext/date (Derick)
  14. expose ICU regular expression features either in unicode or create an ICU extension that exposes ICU related things.
  15. change ctype functions to use ICU underneath. (Andrei)
  16. Check that we normalize identifiers, class names properly and optimize normalization vs. case-folding. (Andrei or Dmitry)
  17. Optimize [] access of Unicode items since its based on code points, possibly store last access point so we can skip to that? This would require extending the zval.
  18. Add character set conversion error mode. (Andrei)

Non-Unicode

  1. Add a method to take ownership of the memory buffer in memory streams so that generating string values for zvals doesn't require an estrdup. (Sara)
  2. Review pecl/http and see if it should be moved into the Core. Needs API review and code review.
  3. Add unified unlimited precision integer support. Optimize it to use 64-bit integers on all platforms for appropriate range and extend to unlimited precision on overflow using GMP. Going to use L for 64-bit and L& for any integer type. (Scott)
  4. zend_parse_parameters(): Add a flag to throw exceptions instead of errors (ZEND_PARSE_PARAMS_EXC or something).
  5. Add __cast() magic method that will be called for all casts. If the __toString() method is there it will get used for string types first. (Andrei)
  6. Reimplement the parser with Lemon rather than bison; we still need to come up with a solution for the mid-rules support. (Scott)
  7. Large File Support, patch available by Joe Orton but it doesn't handle the cases were a library wasn't built with the support. Someone needs to take a look. (See also bug #27792)
  8. Add ZEND_ACC_READONLY so a property can be declared as read-only. (Sara)
  9. Internal flag to force parent constructor to be called from child's constructor. (Andrei, Sara)
  10. C99 datatypes, clean up the mess we have with all the different integers and types we have going around (Scott)
  11. Implement reflection cache - caching reflection class pointer in zend_class_entry (Scott)
  12. Investigate asyncronous DB calls in PDO - this is mainly for updates/deletes/inserts (Wez)
  13. Implement signals support for handling signals during critical sections on all SAPIs, still waiting on Windows support. (Shire)
  14. Current way of referring to functions and methods is awkward, i.e. “myFunction” and “array($this, 'method')”. We should consider making a “callable” type that would incorporate them as well as closures. That way every function and method can be represented as an object and can be passed around, generated, decorated, etc. Need an RFC for this. (Andrei)
  15. Tainted mode support. Consensus was that even if we add it, we might give a false sense of security, seems like safe_mode v2 but it might make a useful developer feature.
  16. Clean up static method stuff. No more ZEND_ACC_ALLOW_STATIC - throw it out.
  17. @operators. RFC it. (Stas, need more clarification)
  18. Not going to bundle cURL, the number of releases it does that are sometime security related would be a release nightmare.
  19. ArrayObject should be accepted everywhere regular arrays are. Need to have internal array API that can accept either a hashtable or ArrayObject and iterate/access/set/unset etc properly. Same could be done for ArrayAccess. Need RFC.

Day 2

PHP 5.4?

  1. Move unmaintained DB extensions to PECL
    • make PDO the primary supported DB interface
    • Remaining: mysql, mysqli, pgsql, sqlite3, oci8
    • Remove pdo_dblib (not supported)
  2. mbstring engine integration + function overloading should be removed in PHP 6. The extension functions will stay, maintained by Moriyoshi.

PHP 6

  1. Database extensions
    • pgsql needs to be upgraded to work with Unicode (Ilia)
    • dba - upgrade (Scott)
  2. Look at the valgrind messages and fix the issues.
  3. Failed tests: fix or adjust for expected behavior.
  4. Set up a testing environment for testing applications/frameworks:
    • Wordpress, Drupal, Wikimedia
    • ez, ZF
    • Put up a wiki page to log the issues with running apps under PHP 6 (Unicode Issues)
    • Outline “expected to fail” issues
  5. Functions requiring binary data (hash, crypt, urlencode):
    • binary strings are accepted normally
    • if a Unicode string is passed, it is converted to UTF-8 and E_STRICT is issued
  6. Leave short tags alone - never talk about it again.
  7. Consider making identifiers case-sensitive (one more time).
    • Reasons:
      • normalization issues
      • significantly speed up the engine (case folding and normalization on every lookup)
    • Migration path:
      • 5.4 - E_STRICT errors on case sensitive names (like constants)
      • 6.1 actually do case-sensitive identifiers, which have to be in precomposed/normalized (NFC form)
  8. Clean up constness issues in the core.
  9. Traits - real patch against HEAD before any decisions are made.
  10. Make sure Phar is synced with head - (Greg)
  11. Type hinted return values, scalar type hints - need working patches. These will not do auto-conversion for now, we may consider it later.
  12. Proposal how to implement the closure stuff with classes - for 5.4 (??)
  13. function call chaining (f()() if f() returns function), and array dereferencing (f()[0]) - (Stas)
  14. Increase the evangelism for ext/filter - documentation, blogs, site, etc. People need to use it.
  15. Reserve namespaces “PHP” - prevent malicious use and preserve for future use. PECL extensions should not use PHP namespace.
  16. C#-style properties with getters/setters. Allow per-property __getFoo, __setFoo magic functions that would be invoked regardless of whether the property exists or not. Then add a bit of syntax to allow easier generation of these, such as:
     <?php
      class Foo {
         public $bar
             getter { return $this->bar; }
             setter { $this->bar = strtolower($value); }
         ;
      }
     
  17. Lazy loading of functions/methods. (Shire)
  18. Take another look at PDO 2. Quoting Wez, “it might be about time to see if the vendors are willing to play with us again, and where the original plan was to have all the major vendors on board, we may well be looking at cutting out the less flexible vendors from the baseline PHP distribution”.
  19. Modify parser to allow including one .ini file from another. (Shire)
  20. Static classes were discussed, but no real use case was presented. If someone has a real use case + patch, we can consider again.
  21. Introduce the concept of “strict” classes that do not allow creation of dynamic properties on the fly. Need a patch and a volunteer. (Derick)
  22. Read-only variables (zvals). Could be used to save memory for DB results since we wouldn't need to copy DB result buffer into Zend-managed memory. (Shire?)
  23. Remove “final” modifiers from the Exception properties—they are very limiting.
  24. Streams interfaces (?? FIIK) (Sara)
summits/pdmnotesmay09.1248298579.txt.gz · Last modified: 2017/09/22 13:28 (external edit)



Table of Contents