Nash's world

Tag: php

PHP variable variables; “variable variable takes the value of a variable and treats that as the name of a variable”. Also, variable.

by on Oct.19, 2010, under Programing

this is only the entrance of the rabbit hole.

If you understand what this expression really does, you realize that you’re gazing upon the entrance to R’lyeh.Do you think you don’t need your soul anymore? If you do, follow me into the lair of the Elder Gods. But be warned, you will die a lot inside.The first thing to understand is what $ is. $ is actually a shorthand for ${} and means “return the value of the variable whose name is contained in this”.That variable name is a string.

A bare word is a PHP string. Let that sink for a second, because we’ll come back to it later: $foo really is the concatenation of $ the variable-indirection character (think *foo) and foo which is a string. foo === "foo" in PHP, even though in raw source code you’ll probably get a warning. If those are enabled.

(continue reading…)

4 Comments :, , , more...

Facebook has rewritten the PHP runtime from scratch

by on Jan.31, 2010, under Programing

It seems the rumors that php being rewritten by facebook seems true. A new open source project that is going to be released by them come this tuesday.  The unofficial word is that it is some sort of compiler for php and some poor soul has been hacking away trying to implement it for past one year and it is rumored to have reduced the cpu usage by 80%. php stuff This is pretty significant numbers if its true. For most of the webapps the performance issues are going to be on the network latency and DB rather than the script engine but with a 80% reduction is cpu time means the page can be chuged out 400% faster dramatically reducing the hardware costs.  with user numbers in 100’s of millions for facebook even 1% gain in performance will save them a chunk of change.

Every one of you know how much a evagilist i am when it comes to python while no where fast as .net or Java it can pretty much wipe the floor with every day venilla php in performance numbers, especially with Mod_wsgi or fast_cgi implemented. Facebook with thousands of man hours invested in their code base they cannot just up and switch to another language with out major cost or headaches. So they have done the next best thing changed the internals of the tired old donkey they being riding around so that its rocket powered so that it can run with the Lamborghini’s.

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...

IDL

Member of The Internet Defense League