Live data from Hacker News

PHP 7.3.0 alpha 1 Released

php.net

31–40 of 49 posts

Re: PHP 7.3.0 alpha 1 Released

#31
post #16

Earlier quoted context omitted.

I don't speak for the parent (and I don't think the assertion is correct), but I will say that PHP jobs outside the valley are plentiful. A large percentage of those are legacy maintenance or development on unpleasant platforms such as WordPress or Magento, but there is still a lot of challenging and enjoyable work being done using PHP, and the improvements to the language over the last few years have made many of th…

I'm asking about salary ranges specifically.

I know some php devs from munich in germany which started at 64k per year. Others earn 70k+ per year. In agencies (wordpress i.e.) jobs start at 48k.

Re: PHP 7.3.0 alpha 1 Released

#32
post #18

I recently revisited some of the earliest web code I ever wrote, which was in PHP 5.5 (about 7 years old, I think). I wasn't surprised by all the mistakes I made, both from being a newbie programmer and from making what I think were fairly easy-to-make PHP mistakes. After all, every tutorial I could find back then used mysql, didn't used real_escape_string, etc. What was surprising was how hard I had to dig now, 7 ye…

http://www.phptherightway.com/ attempts to do just that - can't vouch for its effectiveness, but is a resource that was at least updated for PHP 7... https://github.com/codeguy/php-the-right-way

I always hated the DI fervor in PHP, like it solves all problems. You get such gems from phptherightway as

> We can demonstrate the concept with a simple, yet naive example.

> Here we have a Database class that requires an adapter to speak to the database.

It tries so hard to be java, which seems backward.

Re: PHP 7.3.0 alpha 1 Released

#33
post #18

I recently revisited some of the earliest web code I ever wrote, which was in PHP 5.5 (about 7 years old, I think). I wasn't surprised by all the mistakes I made, both from being a newbie programmer and from making what I think were fairly easy-to-make PHP mistakes. After all, every tutorial I could find back then used mysql, didn't used real_escape_string, etc. What was surprising was how hard I had to dig now, 7 ye…

Why not fall back on a microframework like Slim, or something that has best practices built-in like Laravel or Symfony.

7 years ago we had Codeigniter, which was also quite good.

Re: PHP 7.3.0 alpha 1 Released

#34

Earlier quoted context omitted.

http://www.phptherightway.com/ attempts to do just that - can't vouch for its effectiveness, but is a resource that was at least updated for PHP 7... https://github.com/codeguy/php-the-right-way

I always hated the DI fervor in PHP, like it solves all problems. You get such gems from phptherightway as > We can demonstrate the concept with a simple, yet naive example. > Here we have a Database class that requires an adapter to speak to the database. It tries so hard to be java, which seems backward.

I can only agree. I wrote a CMS with Zend Framework 2 which is heavy on DI and tries to be like Spring + Hibernate (Doctrine). Apart from being very hard to understand for new devs in the project, it's also very, very slow.

The way PHP is evolving is definitely towards the Java world and I think it's the worst decision they could make.

Moved to Go 5 years ago, never looking back.

Re: PHP 7.3.0 alpha 1 Released

#35
post #29
post #15

- JSON: . Added JSON_THROW_ON_ERROR flag. (Andrea) A blessed day, prior to this, json_decode would simply return null on error.

Absolutely, before you had to do some check like: if(null === $data = json_decode($json)) throw new Exception();

Wrong! "null" is a valid JSON-serialized value! You MUST call json_last_error.

Better yet - don't use PHP.

Re: PHP 7.3.0 alpha 1 Released

#36
post #18

I recently revisited some of the earliest web code I ever wrote, which was in PHP 5.5 (about 7 years old, I think). I wasn't surprised by all the mistakes I made, both from being a newbie programmer and from making what I think were fairly easy-to-make PHP mistakes. After all, every tutorial I could find back then used mysql, didn't used real_escape_string, etc. What was surprising was how hard I had to dig now, 7 ye…

phpdelusions.net

Re: PHP 7.3.0 alpha 1 Released

#37

Earlier quoted context omitted.

http://www.phptherightway.com/ attempts to do just that - can't vouch for its effectiveness, but is a resource that was at least updated for PHP 7... https://github.com/codeguy/php-the-right-way

I always hated the DI fervor in PHP, like it solves all problems. You get such gems from phptherightway as > We can demonstrate the concept with a simple, yet naive example. > Here we have a Database class that requires an adapter to speak to the database. It tries so hard to be java, which seems backward.

What is DI?

Re: PHP 7.3.0 alpha 1 Released

#38

Earlier quoted context omitted.

http://www.phptherightway.com/ attempts to do just that - can't vouch for its effectiveness, but is a resource that was at least updated for PHP 7... https://github.com/codeguy/php-the-right-way

I always hated the DI fervor in PHP, like it solves all problems. You get such gems from phptherightway as > We can demonstrate the concept with a simple, yet naive example. > Here we have a Database class that requires an adapter to speak to the database. It tries so hard to be java, which seems backward.

If you remember that so, so much old PHP was reliant on global scope included from other files, it explains a lot of the DI obsession. If you were lucky, it was just a single bootstrap.php, but often not.

Re: PHP 7.3.0 alpha 1 Released

#39

Earlier quoted context omitted.

I always hated the DI fervor in PHP, like it solves all problems. You get such gems from phptherightway as > We can demonstrate the concept with a simple, yet naive example. > Here we have a Database class that requires an adapter to speak to the database. It tries so hard to be java, which seems backward.

What is DI?

Dependency Injection: http://www.phptherightway.com/#dependency_injection
Post reply on HN