# [patch] Late static bindings (LSB)

- Thread: https://externals.io/message/31896
- Original archive: https://news-web.php.net/php.internals/31896
- Started by Etienne Kneuss on 2007-08-24T13:18:41+00:00
- Messages: 2
- 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

---

## #31896 — Etienne Kneuss — 2007-08-24T13:18:41+00:00

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

Hi internals,

here is a patch that implements Late static bindinds in a way that 
minimizes the performance hits that were feared.
There is no significant slowdown or memory usage increase when running 
Zend/bench.php, which I assume is a
good enough bench for that kind of matter, as it involves a stupid 
amount of (recursive) function calls.

You can also find the patch here: 
http://patches.colder.ch/Zend/late_static_bindings_take6.patch?markup

Here is a document that describes its usage: 
http://colder.ch/news/08-24-2007/28/late-static-bindings-expl.html

Regards,

-- 
Etienne Kneuss
http://www.colder.ch

Men never do evil so completely and cheerfully as 
when they do it from a religious conviction.
-- Pascal

---

## #31903 — Dmitry Stogov — 2007-08-24T16:55:10+00:00

URL: https://externals.io/message/31896#31903 · In reply to: #31896

Hi Etienne,

We already have patch for late static binding that is very similar to yours.
If you have time, please compare them.
From quick look I see that our patch more accurate (it supports constants
and runtime function calls)
Does our patch miss something that your patch does?

Thanks. Dmitry.

> -----Original Message-----
> From: Etienne Kneuss [mailto:colder@php.net] 
> Sent: Friday, August 24, 2007 5:19 PM
> To: internals@lists.php.net
> Subject: [PHP-DEV] [patch] Late static bindings (LSB)
> 
> 
> Hi internals,
> 
> here is a patch that implements Late static bindinds in a way that 
> minimizes the performance hits that were feared.
> There is no significant slowdown or memory usage increase 
> when running 
> Zend/bench.php, which I assume is a
> good enough bench for that kind of matter, as it involves a stupid 
> amount of (recursive) function calls.
> 
> You can also find the patch here: 
> http://patches.colder.ch/Zend/late_static_bindings_take6.patch?markup
> 
> Here is a document that describes its usage: 
> http://colder.ch/news/08-24-2007/28/late-static-bindings-expl.html
> 
> Regards,
> 
> -- 
> Etienne Kneuss
> http://www.colder.ch
> 
> Men never do evil so completely and cheerfully as 
> when they do it from a religious conviction.
> -- Pascal
