PHP, the venerable scripting language for server-side Web development, has been upgraded in a point release highlighted by a new debugger.
Released late last week and downloadable at PHP.net, PHP 5.6 features the Phpdbg debugger, implemented as a SAPI (Server API) module. "Having a debugger built into the language makes it very accessible to any developer whether they are using an IDE or not," says Andi Gutmans, CEO of PHP tools builder Zend Technologies and a participant in development of the language, in an email. The debugger features step-through debugging, easy access to currently executing code, and remote debugging support, with a bundled Java GUI, according to documentation.
Gutmans described PHP 5.6 as "a routine annual minor release." These releases offer enhancements but try to minimize major backward-compatibility breaks so as to enable easy adoption. The community itself, however, is working toward a PHP 7 release based on the PHPNG code base to significantly improve performance for PHP applications. "We hope [version 7] will be out in the next 12 to 18 months," he said, "but only time will tell."
Version 5.6 also sports variadic functions, which make it easier to deal with variable argument lists for functions and methods. "This improves readability and reduces complexity for code that needs to deal with variable argument lists," Gutmans said.
Other updates include enhancements to namespace support, allowing the importing of constants and functions, and constant scalar expressions. "It is now possible to provide a scalar expression involving numeric and string literals and/or constants in contexts where PHP previously expected a static value," PHP documentation states.
Version 5.6 introduces some changes affecting compatibility. Array keys will not be overwritten when defining an array as a property of a class via an array literal. Also, the
json_decode function, for decoding a JSON string, is more strict in JSON syntax parsing. Stream wrappers now verify peer certificates and host names by default during the use of SSL/TLS, and GMP resources are now objects.
This story, "PHP 5.6 features built-in debugger, better namespace support," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.