Hacker News new | past | comments | ask | show | jobs | submit login

Whats missing from this list?

HipHop making an alternative VM. I see that as the biggest change in PHP in 2012. Sure HipHop has a translator/compiler (HPHPc) for a while now, but now they have a full fledged VM with a JIT (HHVM). Maybe next year we can get a sane extension framework and make a less memory intensive construct then zvals.




HipHop is incredibly promising, though it basically wasn't used outside Facebook in 2012. I hope it will get more adoption in 2013, which (as well as the performance benefits) should make PHP play a bit better with the Heroku-style services. (Since it makes a full-on web server unnecessary.)


I heard with hip hop you cannot easily use your typical C php plugins?


I think that's going to be difficult, at least initially. It looks like you at least get a MySQL client though, and it can run WordPress with only a few changes: http://www.hiphop-php.com/wp/?p=113


This may be a blessing in disguise of sorts. Many of the plugins that ship with PHP are the cause of it's poor reputation.

If a VM makes them design sane consistent and useable versions of those plugins from the ground up PHP may be improved as a result.


Hehehe so true. We use some odbc driver at my company and it had major memory leaks / seg faults. I had to compile debug versions and test it out to figure out what was going on. That being said, some PHP modules are really great and would be hard to live without. I need mysql, memcached, apc, json_decode, etc... I guess the extensions I've written myself I could rewrite to some hip hop spec?


They have most of those it appears, not including apc which shouldn't be necessary anymore, however I can't find the spec's to write extensions.


> not including apc which shouldn't be necessary anymore

APC is a bit more than an opcode cache. It can be used like memcache, although restricted to the machine it's running on. It's my understanding that it is a part of hhvm?


There are some alternative data constructs in PHP, for example there are the SplFixedArray[1] and SplDoublyLinkedList[2] classes.

The SPL data structures are meant to be faster and leaner implementations of common data structures that are usually created ad hoc in plain PHP.

[1] http://ca.php.net/splfixedarray

[2] http://ca.php.net/manual/en/class.spldoublylinkedlist.php


SplFixedArray tends to use about 30% less memory overalll, based on some tests I did about a year ago with PHP 5.3


Those are good and help a little, but the real issue isn't just the zval containers its zvals themselves. the Spl* structures are just proof that there is lots of room for improvement of the raw php data types.


I tried hiphop earlier this year, on a large WordPress installation, and it does not make the cut. It's unstable, crashes randomly. This on top of the pain of working around missing features, like eval or dynamic vars (think $$foo). It does show great promise, but until it gets heavy use outside of Facebook, it's not for me.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: