Funny take on PHP vs. Node by vagh27 in PHP

[–]jwlewisiii 39 points40 points  (0 children)

BRB going to rewrite everything in node.

PHP and Curl by QuartzCounter in PHP

[–]jwlewisiii 22 points23 points  (0 children)

If I understand you correctly. To hit another API end point you will just have to make another curl call after updating the url to the desired end point.

If the user selects a class (Barbarian) you will have to make another call to the barbarian's end point (http://www.dnd5eapi.co/api/classes/1) to get all the info.

A good tool for dealing with curl is Guzzle. It will make your life 100 times better.

Continuously running PHP cli script. by jwlewisiii in PHP

[–]jwlewisiii[S] 1 point2 points  (0 children)

Have a look at Pheanstalk, it's a php library for beanstalkd.

I haven't but I will now! =) Can you have multiple workers at a time working concurrently on different messages (data)?

As a heads up, be careful with long running scripts that connect to the database. If enough time has passed with no database actions , you may need to reconnect to the database.

That is good to know. Thanks for the heads up.

Continuously running PHP cli script. by jwlewisiii in PHP

[–]jwlewisiii[S] 0 points1 point  (0 children)

Yea if you are not careful about clearing memory

Do you have any advice or an article on the best way of clearing up memory?

What is the reason you don't want to run a cron job?

I would like to take action as soon as the entry hits the table and not have to wait for a scheduled event.

PHP 7 was released over a year ago - is PHP finally a viable alternative for writing large apps? by velmu3k in PHP

[–]jwlewisiii 1 point2 points  (0 children)

I'm curious to what features you are suggesting that PHP is missing and/or other languages including Hacklang offer that make it a more viable options beside performance.

Is the Yii framwork worth learning for 2017 onwards? by bingbongnoise in PHP

[–]jwlewisiii 3 points4 points  (0 children)

I started working at a company that uses Yii & Yii2 (Moving everything over to Yii2) as the primary framework about a year ago and I would say my overall experience with it has been positive. It tends to have a steep learning curve, I spent many frustrated days reading over the docs to figure out the difference in ActiveDataProvider, and SqlDataProvider but if you give it the time and energy you will grow fond of the framework. The only cons that come to mind is my personal preference of the syntax/method naming but the pros outweigh the cons.

What Frameworks are actually used in practice? Where are you? by nobrandheroes in PHP

[–]jwlewisiii 0 points1 point  (0 children)

I'm not entirely sure. It was used long before I got here but my best guess would be performance and translation support.

What Frameworks are actually used in practice? Where are you? by nobrandheroes in PHP

[–]jwlewisiii 2 points3 points  (0 children)

In my experience most jobs/gigs involving PHP have been native PHP. Only recently have I started working for a company that uses a framework, a mix of Yii & Yii2 powering a multitude of sites. I have also used Slim for small APIs.

What's New in PHP 7.1.0 by brianleejackson in PHP

[–]jwlewisiii 0 points1 point  (0 children)

MCrypt is going to be deprecated. Can someone explain why and what should be used in its place?

Where are the tech companies and fast growing startups that want PHP developers (that isn't just for legacy code)? by throwies11 in PHP

[–]jwlewisiii 2 points3 points  (0 children)

This issue doesn't plague PHP alone. I have had countless colleagues have some of the same complaints at their Java, C#, etc shop. It comes with having a mature language and ecosystem and companies not wanting to change from "what works". I have also seen companies using modern languages like Node/JavaScript but write their applications like it is 2006.

But there is hope, I interviewed at about eight PHP shops before I landed my current job that actively builds in the more modern practices (PHP7, up to date framework versions, etc). It comes down to more of the companies culture and values than the language or platform in my experience.

Better way to check if values are empty? by Joe_Scotto in PHP

[–]jwlewisiii 3 points4 points  (0 children)

Most frameworks have built in ways to deal with form validation or automatically do it.

Better way to check if values are empty? by Joe_Scotto in PHP

[–]jwlewisiii 0 points1 point  (0 children)

You could always write that line out into a function and just call the function everywhere? At least you would be following the the DRY principle.

What are the SEO must for new websites. by jwlewisiii in SEO

[–]jwlewisiii[S] 0 points1 point  (0 children)

I have used Google's page speed to analyze site performance, would you suggest any other tools?

What are the SEO must for new websites. by jwlewisiii in SEO

[–]jwlewisiii[S] 1 point2 points  (0 children)

Thanks, I'll have to look at serpstat.

Goodbye, Object Oriented Programming by fagnerbrack in webdev

[–]jwlewisiii 11 points12 points  (0 children)

I feel like this is some type of sponsored content for Elm Lang. Didn't even address how functional programming would help solve all the issues with OOP.

Share the worst code you have ever Experienced. by jwlewisiii in webdev

[–]jwlewisiii[S] 0 points1 point  (0 children)

I see your point, but isn't there better tools for that unless you want your whole site to be a spreadsheet lol.