Growing the PHP Core – One Test at a Time | Florian Engelhardt

Learn how to contribute to the PHP core by writing tests, exploring features like concurrent test execution and code coverage reporting, and discover the PHP test framework's capabilities.

Key takeaways
  • It’s possible to contribute to PHP without writing C code or creating an extension, but by writing tests.
  • PHP does output compression for clients that accept it, but it’s not necessary to do it manually.
  • The setlib_get_coding_type function can be tested by setting the HTTP accept encoding header to gzip or deflate.
  • Tests for PHP are written in PHP, and can be run locally by compiling PHP from source.
  • The test runner allows for concurrent test execution, which can significantly speed up testing.
  • The PHP test framework includes features such as the skip-if and extension sections, which can be used to control which tests are run.
  • The setlib_output_encoding function is used to set the output encoding for PHP.
  • The send_hash_string_find function is used to find the HTTP accept encoding key in the HTTP global.
  • The convert_to_string function is used to convert the output encoding to a string.
  • The any_set function is used to set the output encoding to the desired value.
  • The GCP encoding is a type of output encoding that can be used with PHP.
  • The zip archive class is used to work with zip files in PHP.
  • The PHPUnit test runner is used to run tests for PHP.
  • The code coverage report is used to track which lines of code are executed during testing.
  • The setlib_get_coding_type function can be used to get the current output encoding for PHP.
  • The PHP test framework includes a number of features that can be used to write and run tests for PHP.