Browse Source

Rename constructor functions to __construct

Stefan Siegl 9 năm trước cách đây
mục cha
commit
cbbce91ffd
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      tests/get_constructor.phpt
  2. 1 1
      tests/magic_func.phpt

+ 1 - 1
tests/get_constructor.phpt

@@ -6,7 +6,7 @@ Test V8::executeString() : Get constructor method
 <?php
 
 class Foo {
-	function Foo() {
+	function __construct() {
 		echo "called constructor: ";
 		var_dump(func_get_args());
 	}

+ 1 - 1
tests/magic_func.phpt

@@ -9,7 +9,7 @@ class Foo {
 	var $bar = 'foobar';
 	var $nullprop = null;
 
-	function Foo() {
+	function __construct() {
 		echo "called constructor: ";
 		var_dump(func_get_args());
 	}