Tools

TomiS said

15 comments

Bottom

bergie  

It is a limited version of PHP, for example lacking eval()

bergie commented on posted to #PHP 02.02.2010 (en)

lindstorm  

I could imagine eval being a big resource hog, so no wonder why they decided to live without it in their version. One can make virtually anything with alternative methods.

lindstorm commented on posted to #PHP 02.02.2010 (en)

mtarvainen  

Lack of eval() is nothing but a good thing. Theres no really need for it, I think.

mtarvainen commented on posted to #PHP 03.02.2010 (en)

tepheikk  

@bergie But as I understand, it should be possible to make parts of your code or application to use HipHop. I can't wait to see what else is excluded (I've never directly used eval) and does it run extensions nicely.

tepheikk commented on posted to #PHP 03.02.2010 (en)

bergie  

MidCOM (the old MVC framework for Midgard1) uses tons of eval(). Midgard MVC doesn't, so services using the new stuff (like Qaiku) could theoretically run on top of HipHop.

I just wonder how HipHop handles PHP extensions...

bergie commented on posted to #PHP 03.02.2010 (en)

bergie  

Rasmus Lerdorf: HipHop on simpler template-style PHP pages probably isn't going to help you too much. It's not going to make your SQL queries any faster.

bergie commented on posted to #PHP 03.02.2010 (en)

mtarvainen  

Whats definition for "simpler template-style PHP pages"? I hope that nobody expected it to optimize SQL-queries :D

mtarvainen commented on posted to #PHP 03.02.2010 (en)

indeyets  

@bergie it has a limited subset of extensions and you can't directly use arbitary extensions with it. those should be rewritten.

Ilia Alshanetsky wrote a nice article

indeyets commented on posted to #PHP 03.02.2010 (en)

TomiS  

I've never used eval() for anything. In fact, I don't even know what it does :)

TomiS commented on posted to #PHP 03.02.2010 (en)

indeyets  

in php-5.2 eval() and create_function() are pretty much your only choices if you need to do some code-generation. in php-5.3+ there are closures which give a better, stricter way to do it.

But… HipHop is limited to 5.2 for now (they are working on adding 5.3 features)

indeyets commented on posted to #PHP 03.02.2010 (en)

TomiS  

Until now, I've understood that it's generally more efficient to make complicated SQL queries and simple PHP filtering etc. to the result set. I wonder if HipHop manages to turn that over so that in the future it's a good idea to make simple SQL queries and modify the result set mostly with PHP.

TomiS commented on posted to #PHP 03.02.2010 (en)

TomiS  

@indeyets Ah, I see. Thanks. :)

TomiS commented on posted to #PHP 03.02.2010 (en)

smallone  

@TomiS it will still need complicated queries. The application should never do something that the database is good at. Even in compiled languages you need efficient queries.

smallone commented on posted to #PHP 03.02.2010 (en)

mtarvainen  

@smallone In the perfect word it would be that way. But...

mtarvainen commented on posted to #PHP 03.02.2010 (en)

smallone  

@mtarvainen yeah i know the world is far from perfect ..i have to rewrite parts of an php application next month that has select * and tons of pregex stuff in it.

smallone commented on posted to #PHP 03.02.2010 (en)

Login or register to leave a comment

Publicity
These messages are public and can be seen by anyone.