Edit report at http://bugs.php.net/bug.php?id=51813&edit=1
ID: 51813 Updated by: johan...@php.net Reported by: richard at rjharrison dot org Summary: Cannot declare a class property with a closure value -Status: Open +Status: Bogus Type: Bug Package: *General Issues Operating System: Linux PHP Version: 5.3.2 New Comment: This was reported in other reports, and follows the current specification of the feature. There were discussions about this. This might be re-evaluated but would require a good RFC (incl. discussion of cases where methods and properties with the same name or a __call method exist) not a bug report. Previous Comments: ------------------------------------------------------------------------ [2010-05-13 20:04:11] richard at rjharrison dot org Description: ------------ When declaring a class one cannot use a closure as the value of a class property. Test script: --------------- http://pastie.org/958947 Expected result: ---------------- I expect closures to be allowed when defining a class's properties; it seems inconsistent that one can assign a closure to a property dynamically at run time, but not when defining a class. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51813&edit=1