Closed aurora closed 9 years ago
as the lua class is now final.
lua_ce->ce_flags |= ZEND_ACC_FINAL;
extending the Lua class is not possible anymore. your sample now ends with
Fatal error: Class a may not inherit from final class (Lua) in /home/admin/tmp/php-lua/1.php on line 3
i think thats fine - and there are otherways to achive a construct you want, and this issue could be closed
Ok ... still think that extending native classes is a valid use case, but yep, i am using a different architecture for this anyway. So ... i am closing.
I am sometimes extending the Lua class to provide additional functionality. One problem i have is, that "private" properties of the sub-class are treated like properties of the Lua class which leads to the problem, that the values stored in them get lost. The following code for example prints "NULL":
I understand, that this happens to "protected" and "public" properties of class b, but shouldn't be the "private" properties treated different?