PHP 7.4 releases with type declarations, shorthand syntax in Arrow functions

The PHP development team announced the availability of PHP version 7.4. This marks the fourth feature update to the PHP 7 series. PHP 7.4 comes with numerous improvements and new features. Key features in PHP 7.4 Class properties support type declarations. Starting from PHP 7.4, arrow Continue reading PHP 7.4 releases with type declarations, shorthand syntax in Arrow functions

What is the difference between the postfix i++ and prefix ++i increment operators?

Both increment the variable value by 1. The difference is what they evaluate to. The postfix increment operator evaluates to the value before it was incremented. The prefix increment operator evaluates to the value after it was incremented. What others are reading:C++ :: Don’t Continue reading What is the difference between the postfix i++ and prefix ++i increment operators?

Eloquent ORM – Increments and Decrements

Eloquent ORM seems like a simple mechanism, but under the hood, there’s a lot of semi-hidden functions and less-known ways to achieve more with it. First example :: Increments and Decrements Instead of this: $article = Article::find($article_id);
$article->read_count++;
$article->save();
 You can do Continue reading Eloquent ORM – Increments and Decrements