Live data from Hacker News

Lumen – A micro-framework by Laravel

laravel-news.com

81–90 of 116 posts

Re: Lumen – A micro-framework by Laravel

#81
post #39

Earlier quoted context omitted.

I'm a PHP developer that works for a major media company. We do large scale deployments, and I'd like to say that PHP is a terrible language that gets a bad rap. It's getting better, and it's already 1000000x better than the PHP4 days, but it's still not a nice language. It's not a nice runtime. The only thing nice about it is that a zillion people and their dogs all know it and it's relatively easy to deploy.

Any experience with HHVM yet?

We haven't been/won't be using it. Most of our traffic is anonymous, so we can optimize other parts of our stack. We'd rather not have to debug weird shit that comes up because of HHVM incompatibility.

Re: Lumen – A micro-framework by Laravel

#82
post #56

They compare it to Slim 3, which isn't completed yet, sitting in a development branch... Slim 3 will also be PSR-7 compliant, I don't see anything about that anywhere in these Lumen docs.

The framework's author addressed this on reddit: http://www.reddit.com/r/PHP/comments/32kajb/lumen_php_microf...

Interesting. I guess he/she is implying that Lumen is PSR-7 compliant than by the last sentence?

Thanks!

Re: Lumen – A micro-framework by Laravel

#84
post #11

Anyone still using PHP in 2015 is doing it wrong.

Anyone still hating on PHP in 2015 is doing it wrong.

No.

http://www.reddit.com/r/PHP/comments/2zhg6z/how_true_is_this...

Read that and tell me that it is Ok..And see how that comment has been downvoted. That is PHP community for you. In 2015.

Re: Lumen – A micro-framework by Laravel

#85
post #72

Earlier quoted context omitted.

I completely agree. I've used Slim in lieu of Laravel for a number of small API projects. I'm excited about porting them over to Lumen.

Have you ever tried Flight, http://flightphp.com ? It has a smaller footprint than Slim but still has the ability to drop in PHP components. Disclaimer, I'm the author of Flight.

Curious, but why don't your docs request that the install be done with Composer? Manually downloading a tarball isn't the best solution for managing an application dependency.

Re: Lumen – A micro-framework by Laravel

#86
For a micro framework, highly recommend FatFreeFramework - You can see in the upcoming benchmarks how incredibly well it performs for a drop-in (non-compiled) framework... http://www.techempower.com/benchmarks/previews/round10/#sect... ...Also I've found it much easier to learn and use than ones like laravel.

Re: Lumen – A micro-framework by Laravel

#87
post #38

Earlier quoted context omitted.

I wouldn't be surprised if those memory leaks were due to an older version of PHP (GC was recently improved a lot to clean up circular references) or a poorly-written framework, which most of them are. Some people also don't understand that arrays of large data have to be wrapped in objects or explicitly passed by reference in many situations to avoid duplicating them in memory. I've used PHP a few times in the past…

> Some people also don't understand that arrays of large data have to be wrapped in objects or explicitly passed by reference in many situations to avoid duplicating them in memory. IIRC arrays are always passed by reference and only duplicated if you modify the data inside the called function (if not passed with '&' of course) ?

Call-time pass-by-reference (passing with '&') has been either deprecated or removed. It has to be done in the function signature.

> only duplicated if you modify the data inside the called function

I did not know that. Because I've observed the duplication behavior, I assumed that it was never a reference. I guess that's a "feature" when you don't really have any fine-grained, explicit control over pointers or references.

Re: Lumen – A micro-framework by Laravel

#88

Earlier quoted context omitted.

> Some people also don't understand that arrays of large data have to be wrapped in objects or explicitly passed by reference in many situations to avoid duplicating them in memory. IIRC arrays are always passed by reference and only duplicated if you modify the data inside the called function (if not passed with '&' of course) ?

Correct. The runtime uses a copy-on-write implementation when you pass an array by value. Duplicating an array in memory every time it is passed to or from a function would be awful.

> Duplicating an array in memory every time it is passed to or from a function would be awful.

This might be because I originally learned PHP about 16 years ago, but I could swear this used to be the case. There's definitely a reason PHP has the reputation it has, although many of those glaring issues have since been fixed.

Re: Lumen – A micro-framework by Laravel

#89

Earlier quoted context omitted.

Anyone still hating on PHP in 2015 is doing it wrong.

No. http://www.reddit.com/r/PHP/comments/2zhg6z/how_true_is_this... Read that and tell me that it is Ok..And see how that comment has been downvoted. That is PHP community for you. In 2015.

A single downvote on a subreddit is indicative of the PHP community as a whole? Well, shit, time to ditch the language...

Why would you think the third value in ['ab', 'cd', '10', 'gh', '24'] would have a key of '10'? That's the value, not the key.

The docs are quite clear on how this works:

http://php.net/manual/en/control-structures.foreach.php

foreach (array_expression as $value)

vs.

foreach (array_expression as $key => $value)

Re: Lumen – A micro-framework by Laravel

#90

Earlier quoted context omitted.

No. http://www.reddit.com/r/PHP/comments/2zhg6z/how_true_is_this... Read that and tell me that it is Ok..And see how that comment has been downvoted. That is PHP community for you. In 2015.

A single downvote on a subreddit is indicative of the PHP community as a whole? Well, shit, time to ditch the language... Why would you think the third value in ['ab', 'cd', '10', 'gh', '24'] would have a key of '10'? That's the value, not the key. The docs are quite clear on how this works: http://php.net/manual/en/control-structures.foreach.php foreach (array_expression as $value) vs. foreach (array_expression as $…

>Why would you think the third value in ['ab', 'cd', '10', 'gh', '24'] would have a key of '10'? That's the value, not the key.

Can you please take one more look? Values in the first array is used as keys to set values in the second array..

Post reply on HN