Hi!
I'm an 18 years old student from Sweden with an interest in
programming, particularly in solving more
complex problems (like creating a database abstraction, advanced
template parser etc.).
I use PHP because it is a very nice and adaptable language, and I work
as a web developer in my free time.
I've wanted to add a few features to PHP for some time (a few years
ago I tried to implement closures,
but it didn't go well because I didn't really know where to start - by the way,
I really like the current implementation of closures so far!).
Does anyone have somewhere to point me for resources on how to modify
the PHP core?
(More specifically, add/modify things to/in the Zend engine)
I'm attempting to implement a kind of extend-on-the-fly thing, so it
would be possible to
add and replace methods on classes on the fly (for example it would be
helpful when extending
classes and still wanting to refer to them by the same name, eg. in a
framework).
I've tried a few things but I cannot get the parser to parse the
syntax correctly,
it always complains about a T_STRING
that according to my rules
should be there but it thinks not.
I haven't been able to get much information about re2c, so I'm
grateful for help and/or links.
Also, if you think I should start by creating/modifying/fixing
something else (that is easier)
in the PHP core, just tell me ;)
Best Regards
Martin Wernståhl
Hi Martin,
Not sure it can help you, but you may found the following link interesting:
http://phpbuilder.com/manual/en/internals.php
Cheers,
Patrick
2009/6/19 Martin Wernstahl m4rw3r@gmail.com:
Hi!
I'm an 18 years old student from Sweden with an interest in
programming, particularly in solving more
complex problems (like creating a database abstraction, advanced
template parser etc.).
I use PHP because it is a very nice and adaptable language, and I work
as a web developer in my free time.I've wanted to add a few features to PHP for some time (a few years
ago I tried to implement closures,
but it didn't go well because I didn't really know where to start - by the way,
I really like the current implementation of closures so far!).Does anyone have somewhere to point me for resources on how to modify
the PHP core?
(More specifically, add/modify things to/in the Zend engine)I'm attempting to implement a kind of extend-on-the-fly thing, so it
would be possible to
add and replace methods on classes on the fly (for example it would be
helpful when extending
classes and still wanting to refer to them by the same name, eg. in a
framework).I've tried a few things but I cannot get the parser to parse the
syntax correctly,
it always complains about aT_STRING
that according to my rules
should be there but it thinks not.
I haven't been able to get much information about re2c, so I'm
grateful for help and/or links.Also, if you think I should start by creating/modifying/fixing
something else (that is easier)
in the PHP core, just tell me ;)Best Regards
Martin Wernståhl
Hi,
I've wanted to add a few features to PHP for some time (a few years
ago I tried to implement closures,
but it didn't go well because I didn't really know where to start - by the way,
I really like the current implementation of closures so far!).Does anyone have somewhere to point me for resources on how to modify
the PHP core?
(More specifically, add/modify things to/in the Zend engine)
well adding stuff there is, in general, he most complex and a god start
might be o fully understand the architecture there by reading code and
maybe trying to understand bugfixes being made.
For finding something small to do I'd suggest looking over the bugs DB
there are quite a few "simple" bugs, while it might take some time to
find them. For question on details eel free to ask on this list, or on
pecl-dev.
johannes