Home » Php » php – Methods with the same name as their class will not be constructors in xampp

php – Methods with the same name as their class will not be constructors in xampp

Posted by: admin February 25, 2020 Leave a comment

Questions:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Cpdf has a deprecated constructor in C:\xampp\htdocs\leave\client\lib\class.pdf.php on line 24.

<?php
error_reporting(0);
class  Cpdf {

  /**
   * the current number of pdf objects in the document
   */
  public  $numObj = 0;

  /*
   * this array contains all of the pdf objects, ready for final assembly

didn’t understand how to overcome the error in in-Bulit PHP file in XAMPP…….

The main use of this is to create a PDF file as required content and name of the file.

How to&Answers: