]> granicus.if.org Git - php/commit
Improved traits implementation. Now to support __CLASS__ constant in traits php doesn...
authorDmitry Stogov <dmitry@php.net>
Tue, 17 Jan 2012 08:09:13 +0000 (08:09 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 17 Jan 2012 08:09:13 +0000 (08:09 +0000)
commitb515bfbdfbea06307df53d725ea3aa3807504a21
tree2f27a9ad9e76506fe72943b92422ff22110e1df2
parent6b31413b13665cb0fda85aa3cb26b0f701a2d04e
Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments.
Zend/tests/traits/bug55214.phpt
Zend/zend_compile.c
Zend/zend_constants.c
Zend/zend_execute_API.c
Zend/zend_language_parser.y
Zend/zend_language_scanner.l
ext/reflection/tests/traits001.phpt