Evil "eval()" dead?

I've just stumbled upon XF and I can already see that its something I want to switch over to as soon as possible. VB4 is complete garbage and I can't understand how it was ever released. I hear that eval() has overhead, while listener classes are better; but VB4 runs like crap, while VB3 ran great.

Personally, once XF gets released, I plan on porting as many of my mods over that I can. Is there gonna be an advanced SDK available so that us mod authors can make sure our stuff is available asap?
 
I've just stumbled upon XF and I can already see that its something I want to switch over to as soon as possible. VB4 is complete garbage and I can't understand how it was ever released. I hear that eval() has overhead, while listener classes are better; but VB4 runs like crap, while VB3 ran great.

Personally, once XF gets released, I plan on porting as many of my mods over that I can. Is there gonna be an advanced SDK available so that us mod authors can make sure our stuff is available asap?
Both vB 4 and vB 3 use eval();. eval(); is used here for templates.

About advanced SDK? Who knows, you're the first to suggest, but I assume the documentation (if produced) may be enough to satisfy this.
 
In my opinion, not being able to use dynamic values for define() and not being able to unset() things are real deal-breakers, and really limits usage of HipHop. How can you get rid of array associations? Note that $array['key'] = null will still leave the key in the array...
 
As a workaround, can you come up with another null-like substance?

$array['a'] = NULLLIKESUBSTANCE;
$array['b'] = NULL;

Treat $array['a'] as empty (but valid) value. Skip $array['b'] completely as if it were null.

Obviously this is an ugly approach that will require extra logic in each loop, but nothing is impossible -- except me learning regex.
 
In my opinion, not being able to use dynamic values for define() and not being able to unset() things are real deal-breakers, and really limits usage of HipHop. How can you get rid of array associations? Note that $array['key'] = null will still leave the key in the array...
unset() is supported, where did you see documentation it wasn't?

Dynamic defines for setting the name are unsupported.
define($var, $foo); // bad
define('moo', $bar); // good
is a bad idea and there is very little need for it ever.
 
In my opinion, not being able to use dynamic values for define() and not being able to unset() things are real deal-breakers, and really limits usage of HipHop. How can you get rid of array associations? Note that $array['key'] = null will still leave the key in the array...

unset() is supported, where did you see documentation it wasn't?

Dynamic defines for setting the name are unsupported.
define($var, $foo); // bad
define('moo', $bar); // good
is a bad idea and there is very little need for it ever.

Indeed I am sure the only thing unsupported is eval()
 
Thanks. :D It means that at least according to rudimentary synthetic benchmarks tests, your PHP code could run like 40% faster when compiled with HipHop. Facebook, I read, is claiming a 2x increase in performance for their code. So the performance gain varies and depends on the underlying code and on how it is structured.

This is interesting. I'm going to pass a few of my scripts through it, and see what it brings up. Adios eval!
 
Thanks. :D It means that at least according to rudimentary synthetic benchmarks tests, your PHP code could run like 40% faster when compiled with HipHop. Facebook, I read, is claiming a 2x increase in performance for their code. So the performance gain varies and depends on the underlying code and on how it is structured.

its about 2x fast on the website and 4x on the API tier, though if you're spending a lot of time waiting on IO then it will be the same amount of time under HipHop.

They're is usually some gentle massaging required to get a code base working, easier with new code that's designed for PHP 5.2+. The eval() method will need to be killed in the template layer and HTML email, but I haven't looked at that. Normally we force the templates into the filesystem to get around it.
 
Thanks. :D It means that at least according to rudimentary synthetic benchmarks tests, your PHP code could run like 40% faster when compiled with HipHop. Facebook, I read, is claiming a 2x increase in performance for their code. So the performance gain varies and depends on the underlying code and on how it is structured.
WoW neat :) thanks or the explanation. In that case it would be awesome to have ^^ I can do with more speed in my forums :D
 
Top Bottom