Edit report at https://bugs.php.net/bug.php?id=61277&edit=1

 ID:                 61277
 Updated by:         ras...@php.net
 Reported by:        thbley at gmail dot com
 Summary:            Feature request: Shared Keyword
 Status:             Not a bug
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   All
 PHP Version:        5.5.0
 Block user comment: N
 Private report:     N

 New Comment:

APC will eventually go in, but it is not going to be directly mapped to any 
sort 
of special shared keywords. Like I said, there are plenty of ways to map this 
in 
userspace via the various magic methods.


Previous Comments:
------------------------------------------------------------------------
[2012-03-05 05:44:17] thbley at gmail dot com

I think it shouldn't be a big issue to get a small portion of the apc or 
memcache code in the core and make it stable. In the end of 2005, there was the 
decision to include apc in the core. So I think it is not a bad idea to look at 
this again.

------------------------------------------------------------------------
[2012-03-05 03:55:12] ras...@php.net

And APC is still not stable and portable enough to include in PHP, so saying to 
do 
it like APC doesn't mean much. Doing it like APC means not putting it not the 
core. And if you want something just like APC, just use APC. Most of the 
frameworks already do and they include a slower fallback for servers without 
APC.
This is not going to be baked into the object syntax directly since we have all 
the magic methods you need to hook it in yourself.

------------------------------------------------------------------------
[2012-03-05 02:26:09] thbley at gmail dot com

> It is a design decision in PHP not to have such global things in PHP itself.

All PHP frameworks are offering some kind of caching with shared disk or shared 
memory. And I haven't seen a bigger project not using this stuff. It's time to 
rethink this decision.

> - correct locking can be hard

I think the way APC does this it, should do it.

> - such a feature makes scaling over multiple servers hard

It would be enough to have it on one server. For those who want more, can still 
send the data to memcache.

Here is a new example: https://gist.github.com/1975954

------------------------------------------------------------------------
[2012-03-05 00:19:10] johan...@php.net

It is a design decision in PHP not to have such global things in PHP itself. 
Addon modules (you mentioned apc) can add utilities for this, though.

Some reasons include: 
- PHP can be embedded in any application which might add constrains
- correct locking can be hard
- such a feature makes scaling over multiple servers hard
- it messes with copy-on-write
- ...

------------------------------------------------------------------------
[2012-03-04 20:29:34] thbley at gmail dot com

update version :-)

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=61277


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61277&edit=1

Reply via email to