Skip to content

Commit 859a02c

Browse files
committed
Fix intel#2: PHP 4 style constructors are deprecated
Since the old stlye constructors are deprecated as of PHP 7.0.0, and __construct() is already fully supported as of PHP 5.0.0, we change the names of the constructors.
1 parent 3f4a289 commit 859a02c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Student {
6464
"set_fac", "get_fac", "print", "set_grades",
6565
"get_grades", "get_grade", "make_unusable", "to_string");
6666

67-
function Student() {
67+
function __construct() {
6868
$this->valid = true;
6969
$this->annual_grade = 0.0;
7070
Student::$num_instances += 1;
@@ -153,7 +153,7 @@ class Faculty {
153153
var $university_name;
154154
var $students = array();
155155

156-
function Faculty($n, $cty, $ctry, $uname) {
156+
function __construct($n, $cty, $ctry, $uname) {
157157
$this->name = $n;
158158
$this->city = $cty;
159159
$this->country = $ctry;

0 commit comments

Comments
 (0)