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!

December 8, 2022

Steps to set up new AWS EC2 instace to deploy NodeJs application

 



Follow below steps to set up new NodeJs application on AWS EC2 instance:

1. AWS - Create new instace (Download .pem file)

2. Connect EC2 install using .pem file (sudo ssh -i <.pem file full path> ubuntu@<instace Public IPv4 address>)

2. Install nginx (sudo apt install nginx)

3. Install NodeJs (sudo apt install nodejs)

4. Install NPM (sudo apt install npm)

5. Install postgreSQL (sudo apt install postgresql postgresql-contrib)

6. Allow port(5432) for postgreSQL: Goto > instace > Security > Security Groups > Edit inbound rules > Add rule

6. Install git (sudo apt-get install git)

7. Install pm2 to run Node application (https://www.npmjs.com/package/pm2)

8. Now server ready to used you need to get git clone of your project repository.


Enjoy!

December 7, 2022

Steps to update or change NodeJS and NPM versions.


 


1. First let's try to change NPM package version.

- Check current NPM version: npm view npm version

- Using this command you can update npm to latest version: npm i -g npm


2. For Node version best way to manage version use NVM.

- nvm install <Node version> 

- nvm list

- nvm use <Node version>


3. To update NPM:

- npm install -g npm


Enjoy!

November 16, 2022

Steps to point GoDaddy Domain to AWS Route 53.



 

This post guide you to point any GoDaddy Domain to AWS Route 53 service. It's very easy process. Please follow steps. it's help you to host GoDaddy domain with AWS Route 53.


- First of fall sign in to AWS Console

- Go to Route 53 service on AWS

- From left side menu go to Hosted Zone and create new Hosted Zone

- Insert domain and select public hosted zone option

- Save name server form

- Now hosted zone created and it's generate NS(name server) and Route trafic to DNS name

- Now sing in to Godaddy account and go to product manager

- Click on DNS option for the domain you want to point and go to DNS settings

- Add new DNS record, there are four fileds type, name, value and TTL

- Type: Select 'NS'

- Name: type '@'

- Value: Copy from created hosted zone one by one to insert all

- TTL: Select 1 Hour



Note: After this process complete all are good but it's take some time to point DNS.

Enjoy!

1980s Photo Prompts: Easy Online Copy & Paste

Are you on a quest to enhance your photography projects with a touch of nostalgic flair? Look no further than 1980s photo prompts. These car...