March 27, 2023

What's new in the latest version 8.0.12 of PHP

 

What's new in the latest version 8.0.12 of PHP

Introduction

The latest stable release of PHP is version 8.0.12, which was released on September 30, 2021. Below are new features and improvements in PHP 8.0 include:

  • Named arguments: This feature lets developers pass function arguments by name, rather than relying on their position.
  • Union types: This allows developers to declare a parameter or return type as accepting multiple types, for example int|string.
  • Constructor property promotion: This feature simplifies the syntax for defining class properties and initializing them in the constructor.
  • Match expression: Similar to the switch statement, the match expression provides more powerful and concise syntax for matching a value against multiple possible conditions.
  • Attributes: This feature allows developers to add metadata to classes, properties, methods, and functions, providing a more structured way to annotate code.
  • Nullsafe operator: This operator provides a shorthand way to check for null values in a chain of property or method calls.
  • JIT compiler: PHP 8.0 introduces a just-in-time (JIT) compiler, which can improve performance by compiling frequently executed code to native machine code.
  • Improved error handling: PHP 8.0 introduces a new "throw" expression that allows exceptions to be thrown without needing to wrap them in a separate statement. This feature makes error handling more concise and easier to read.
  • Improved type system: PHP 8.0 includes improvements to the type system, including stricter type checking for certain operations, better support for mixed types, and more consistent handling of type errors.
  • New capabilities and classes: PHP 8.0 presents a few new capabilities and classes, including the str_contains() capability for checking whether a string contains a substring, the fdiv() capability for performing drifting point division, and the Stringable point of interaction for objects that can be switched over completely to a string.
These are only a couple of the new highlights and upgrades in PHP 8.0. Engineers are urged to survey the authority discharge notes for a full rundown of changes and new highlights.

Enjoy!

Introduction about Gulp.js with beginner’s Guide

Introduction about Gulp.js with beginner’s Guide

 

INTRODUCTION

Swallow is an open-source Javascript tool stash and assignment sprinter which is based on Node.js and NPM and utilized for the improvement of tedious and redundant errands. Many modules are accessible for various undertakings You don't need to program everything without anyone else, there are almost 800 modules prepared for Gulp.js. However, significantly more, Node.js modules can be utilized to assemble the ideal form and advancement process for your necessities.

WHY GULP JS?

As an Engineer or Website specialist, you will probably require a lot of things to construct a cutting edge site: an improvement server, a preprocessor for your Backtalk, Less, or Pointer documents, mechanization to package your JavaScript, instruments to streamline your code, to pack, gather or move things around. Also, assuming that you change something, you believe your records should refresh naturally, or revive the program. You would rather not do this physically


Introduction about Gulp.js with beginner’s Guide

STEP-1: First we need node js which you can download here. And then run below command on terminal

Node -v

STEP-2: Presently after the Establishment of Nodejs. Introduce Swallow js all around the world similarly. Enter the accompanying order in the order brief or terminal

npm install gulp-cli -g

And then check version version

gulp -v


Installation for Project

To set up your undertaking on your PC, make an envelope called "Site page" for instance. You can likewise make a topic organizer in the event that you're utilizing CMS like Drupal. Then, at that point, introduce a hub project by running the typical order. Make a package.json record in your venture registry by

npm init

- Install the gulp package

npm install --save-dev gulp


- Verify your gulp version

gulp --version


Create a new gulpfile

- Create a file gulpfile.js and add the following code for testing

 function mainTask(cb) {

    // place code here

    cb();

 }

exports.default = mainTask


To run the gulp project run this command directory:

gulp

Setting up Gulp for CSS & JS

npm install sass gulp-sass --save-dev


Advantages

  • Simple to code and comprehend
  • The tremendous speed advantage over some other errand sprinter
  • There are a ton of modules accessible which are easy to utilize and they are intended to do each thing in turn.
  • Performs tedious undertakings over and again, for example, minifying templates, packing pictures, and so on.
  • Assuming that you're utilizing Backtalk, you don't need to import documents. You can straightforwardly make a scss document which will bring into CSS by swallow.
Enjoy!

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...