Notice: The Called Constructor Method For WP_Widget Is Deprecated Since Version 4.3.0! Use __construct()

If you enable debug mode on WordPress you may see this message. The old constructor looks in a Layers Widget like this

$this->WP_Widget( 'wppp', __( 'Popular Posts', 'wordpresscom-popular-posts' ), $widget_ops, $control_ops );

We need to update the widgets with the following

parent::__construct( 'wppp', __( 'Popular Posts', 'wordpresscom-popular-posts' ), $widget_ops, $control_ops );

How to fix GC overhead limit exceeded in Eclipse

You try to open eclipse, the building workspace runs then it throw “GC overhead limit exceeded” error. So this is the way we pass this error.

Eclipse overhead limit exceeded

Above is how the error look like. All things you need to do is allocate more memory to you Eclipse instance.

  1. Go to your Eclipse package folder (right click on eclipse shortcut -> properties -> Open file location)
  2. In this folder, let open the file “eclipse.ini
  3. Find the configuration for “Xms”and “Xmx” then increase the number of memory allocation. They should be like bellow.
    Increase eclipse allocation memory
  4. Restart Eclipse.

Hope this help. Have a nice day.

Database update required

How to stop – Database Update required

Have you ever got WordPress issue “Database update required

WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.

The database update process may take a little while, so please be patient.

The reason is the different between the databases versions in settings to the database version in database. Let’s follow these step below, it would help you out.

Three steps to fix WordPress error Database Update required

1. Check the number of $wp_db_version in /wp-include/version.php
2. Open your database and run this command:

select option_value from wp_options where option_name = 'db_version';

3. These two values must be the same.

Wordpress interview questions

WordPress Interview Questions and Answers

WordPress is the most usage CMS in the world nowadays, so update knowledge and learning about wordpress is very important if you don’t want to be a fogy developer. If you already dive in to WordPress this article will ask you some question in different level then you can test you got about WordPress powerful CMS.

Let’s start WordPress interview questions

1. How do you get the version of WordPress?

You can get Wordpress's version in wp-includes/version.php

Or you can show it everywhere by using this function

echo bloginfo('version');

2. How to check admin user?

if(is_admin()) {
  // something will be applied to admin

Continue Reading

Install Laravel PHP by Composer

As we all know Laravel is becoming one of the best php framework nowadays, if you have not know about this php framework, let’s go to Laravel official page then if you want to try this framework let’s go to Install Laravel Homestead to know how to install laravel homestead. This article also provide you another way to install Laravel PHP by Composer.

Laravel series articles

What is composer?

Composer is the most useful tool for dependency management in PHP nowadays. With Composer you can declare the libraries that your project depends on and it will manage (install/update) them for you. For example: phpoffice/excel or phpspec or even Laravel.
Install Laravel php by Composer
Continue Reading

How to use curl and postman

How to use cURL and Chrome Postman


As the growing of web applications which base on HTTP scripting. The needed of checking and getting the information from the web quickly or post, upload data to web server are very frequent tasks in web development. What’s the best way if we want to quickly do all kinds of URL manipulations and transfers. The answer is cURL and Postman. This article will help you how to use cURL  and Postman in today web development.

cURL Overview

cURL (Client for URLs) can transfer data from or to a web server by using these supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). Don’t worry about those protocols we will focus, that’s just an overview about cURL. What we need is how to use it.

To run cURL command line on window you need to download it here or the easier way is install git then open git bash to run cURL. Continue Reading

Design Patterns Interview Questions

Design Pattern and software design is one of the most essential part of any programming interview whether you are going for Java interview, PHP interview or C# interview and so on. A good programmer are usually a good architecture designer as well as they know how to break down the issues to piece of code. If you have not researched about design pattern, don’t so worry but we recommend you should take a look on Design Patterns Overview. Anyway this article is about some Design Patterns interview questions from beginner to expert as normally questions start with some basic concept of subject then later they continue based on further discussion and your answer.Design pattern interview questions
Continue Reading

Design Patterns: The Singletons Pattern

Follow the series topic regarding to Design Patterns Overview, today we will dive in to Singletons Pattern to understand clearly about it. Also checkout the design pattern series

Singletons Pattern’s definition

According to Wikipedia document:

In software engineering, the singleton pattern is a pattern in design patterns book that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.

In simple form:
A Singleton is a programming design pattern that ensures a single instance of a class across an application.

Singletons Pattern Overview
Continue Reading

Adapter Pattern: The right way

Follow the series topic regarding to Design Patterns Overview, today we will dive in to Adapter Pattern to understand clearly about this really useful pattern. If you want to know more other patterns, Let’s checkout the series of Design patterns

Adapter Pattern’s definition

According to Wikipedia document:

In software engineering, the adapter pattern is a software design pattern that allows the interface of an existing class to be used from another interface.[1] It is often used to make existing classes work with others without modifying their source code.

In visualization:
Adapter pattern
Continue Reading

Design patterns: facade pattern

Design Pattern: Facade Pattern in PHP

In previous article, we already categorized the design patterns, you can check out Design Patterns Overview for more details. You also can checkout the series of Design patterns here

Definition of Facade Pattern

The facade pattern is a software design pattern commonly used with object-oriented programming. The name is by analogy to an architectural facade. A facade is an object that provides a simplified interface to a larger body of code, such as a class library.

The main goal of Facade Pattern

  • Simplicity is the goal of facade pattern.
  • Make your code be structured then it will be easily to understand and well maintained.
  • Defines a higher lever interface that makes the subsystem easier to use.
  • Wrap a complicated subsystem with a simpler interface.

Continue Reading