# New to the PHP internals and I want to help

- Thread: https://externals.io/message/44365
- Original archive: https://news-web.php.net/php.internals/44365
- Started by Martin Wernstahl on 2009-06-18T22:05:48+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #44365 — Martin Wernstahl — 2009-06-18T22:05:48+00:00

URL: https://externals.io/message/44365#44365

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

---

## #44375 — Patrick ALLAERT — 2009-06-19T14:36:52+00:00

URL: https://externals.io/message/44365#44375 · In reply to: #44365

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 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

---

## #44382 — johannes@schlueters.de — 2009-06-20T23:44:54+00:00

URL: https://externals.io/message/44365#44382 · In reply to: #44365

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
