From db76b708cf14ed2794d26600c0e49df8aa36fbea Mon Sep 17 00:00:00 2001 From: Andrea Faulds Date: Tue, 31 Mar 2015 16:10:22 +0200 Subject: [PATCH] Deprecate PHP 4 constructors --- Zend/tests/019.phpt | 4 +-- Zend/tests/bug18556.phpt | 2 +- Zend/tests/bug20240.phpt | 2 +- Zend/tests/bug30080.phpt | 2 +- Zend/tests/bug32226.phpt | 2 +- Zend/tests/bug39542/bug39542.php | 2 +- Zend/tests/bug60536_001.phpt | 6 ++--- Zend/tests/bug65108.phpt | 2 +- Zend/tests/bug65322.phpt | 6 +++-- Zend/tests/errmsg_045.phpt | 6 +++-- Zend/tests/get_class_methods_002.phpt | 1 - Zend/zend_compile.c | 6 +---- Zend/zend_inheritance.c | 27 +++++++++++++++++++ Zend/zend_inheritance.h | 2 ++ ext/mbstring/tests/mb_convert_variables.phpt | 4 +-- .../mysqli_stmt_bind_param_references.phpt | 4 +-- .../mysqli_stmt_bind_result_references.phpt | 8 +++--- ext/pcre/tests/bug21758.phpt | 2 +- ext/session/tests/006.phpt | 2 +- ext/session/tests/019.phpt | 2 +- ext/session/tests/026.phpt | 2 +- ext/soap/tests/any.phpt | 2 +- .../interop/Round2/Base/r2_base_014p.phpt | 2 +- .../interop/Round2/Base/r2_base_014w.phpt | 2 +- .../interop/Round2/Base/r2_base_015p.phpt | 2 +- .../interop/Round2/Base/r2_base_015w.phpt | 2 +- .../GroupD/r3_groupD_compound1_001w.phpt | 2 +- .../GroupD/r3_groupD_compound2_001w.phpt | 4 +-- .../Round3/GroupD/r3_groupD_doclit_003w.phpt | 2 +- .../GroupD/r3_groupD_doclitparams_003w.phpt | 2 +- .../Round3/GroupD/r3_groupD_import2_001w.phpt | 2 +- .../Round3/GroupD/r3_groupD_import3_001w.phpt | 2 +- .../Round3/GroupD/r3_groupD_import3_002w.phpt | 2 +- .../Round3/GroupD/r3_groupD_rpcenc_003w.phpt | 2 +- .../Round3/GroupE/r3_groupE_list_001w.phpt | 2 +- .../Round3/GroupE/r3_groupE_list_002w.phpt | 2 +- .../Round3/GroupE/r3_groupE_list_003w.phpt | 2 +- .../Round3/GroupE/r3_groupE_list_005w.phpt | 2 +- .../Round3/GroupE/r3_groupE_list_006w.phpt | 2 +- .../GroupH/r4_groupH_complex_doclit_001w.phpt | 2 +- .../GroupH/r4_groupH_complex_doclit_002w.phpt | 4 +-- .../GroupH/r4_groupH_complex_doclit_003w.phpt | 8 +++--- .../GroupH/r4_groupH_complex_doclit_004w.phpt | 4 +-- .../GroupH/r4_groupH_complex_doclit_005w.phpt | 4 +-- .../GroupH/r4_groupH_complex_doclit_006w.phpt | 4 +-- .../GroupH/r4_groupH_complex_doclit_007w.phpt | 12 ++++----- .../GroupH/r4_groupH_complex_doclit_008w.phpt | 12 ++++----- .../GroupH/r4_groupH_complex_doclit_009w.phpt | 12 ++++----- .../GroupH/r4_groupH_complex_doclit_010w.phpt | 12 ++++----- .../GroupH/r4_groupH_complex_rpcenc_001w.phpt | 2 +- .../GroupH/r4_groupH_complex_rpcenc_002w.phpt | 2 +- .../GroupH/r4_groupH_complex_rpcenc_003w.phpt | 6 ++--- .../GroupH/r4_groupH_complex_rpcenc_004w.phpt | 4 +-- .../GroupH/r4_groupH_complex_rpcenc_005w.phpt | 4 +-- .../GroupH/r4_groupH_complex_rpcenc_006w.phpt | 4 +-- .../GroupH/r4_groupH_complex_rpcenc_007w.phpt | 10 +++---- .../GroupH/r4_groupH_complex_rpcenc_008w.phpt | 10 +++---- .../GroupH/r4_groupH_complex_rpcenc_009w.phpt | 10 +++---- .../GroupH/r4_groupH_complex_rpcenc_010w.phpt | 10 +++---- .../Round4/GroupI/r4_groupI_xsd_008w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_009w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_014w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_015w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_019w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_020w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_023w.phpt | 4 +-- .../Round4/GroupI/r4_groupI_xsd_024w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_025w.phpt | 2 +- .../Round4/GroupI/r4_groupI_xsd_028w.phpt | 2 +- ext/standard/tests/array/007.phpt | 2 +- .../tests/array/array_intersect_1.phpt | 2 +- .../tests/array/array_udiff_assoc_basic.phpt | 4 +-- .../tests/array/array_udiff_basic.phpt | 4 +-- .../tests/array/array_udiff_uassoc_basic.phpt | 4 +-- .../array/array_uintersect_assoc_basic.phpt | 4 +-- .../tests/array/array_uintersect_basic.phpt | 4 +-- .../array/array_uintersect_uassoc_basic.phpt | 4 +-- ext/standard/tests/array/bug45312.phpt | 2 +- ext/standard/tests/file/bug38450.phpt | 4 +-- .../tests/file/lstat_stat_variation18.phpt | 2 +- .../tests/file/lstat_stat_variation20.phpt | 2 +- .../file/readlink_realpath_variation1.phpt | 2 +- ...link_link_linkinfo_is_link_variation1.phpt | 2 +- .../general_functions/debug_zval_dump_o.phpt | 4 +-- .../gettype_settype_basic.phpt | 2 +- .../general_functions/is_callable_basic2.phpt | 4 +-- .../tests/general_functions/is_object.phpt | 2 +- .../general_functions/print_r_64bit.phpt | 4 +-- .../general_functions/var_dump_64bit.phpt | 4 +-- .../general_functions/var_export-locale.phpt | 2 +- .../general_functions/var_export_basic6.phpt | 2 +- ext/standard/tests/serialize/001.phpt | 4 +-- ext/standard/tests/serialize/bug14293.phpt | 2 +- ext/standard/tests/serialize/bug21957.phpt | 2 +- .../serialize/serialization_objects_003.phpt | 2 +- ext/tidy/tests/027.phpt | 4 +-- ext/xml/tests/bug32001.phpt | 2 +- tests/classes/clone_006.phpt | 2 +- tests/classes/ctor_dtor.phpt | 8 +++--- tests/classes/dereferencing_001.phpt | 4 +-- tests/classes/object_reference_001.phpt | 2 +- tests/lang/028.phpt | 2 +- tests/lang/030.phpt | 2 +- tests/lang/035.phpt | 2 +- tests/lang/bug20175.phpt | 4 +-- tests/lang/bug21849.phpt | 2 +- tests/lang/bug21961.phpt | 4 +-- tests/lang/bug23489.phpt | 2 +- tests/lang/bug24926.phpt | 2 +- tests/lang/error_2_exception_001.phpt | 2 +- 110 files changed, 219 insertions(+), 191 deletions(-) diff --git a/Zend/tests/019.phpt b/Zend/tests/019.phpt index 654f86bb116..0548a38f883 100644 --- a/Zend/tests/019.phpt +++ b/Zend/tests/019.phpt @@ -201,7 +201,7 @@ class Point var $y; var $lable; - function Point($x, $y) { + function __construct($x, $y) { $this->x = $x; $this->y = $y; } @@ -1271,7 +1271,7 @@ bool(false) bool(true) array(3) { [0]=> - string(5) "Point" + string(11) "__construct" [1]=> string(8) "setLable" [2]=> diff --git a/Zend/tests/bug18556.phpt b/Zend/tests/bug18556.phpt index 036abb2ada8..f8e48c2772e 100644 --- a/Zend/tests/bug18556.phpt +++ b/Zend/tests/bug18556.phpt @@ -8,7 +8,7 @@ setlocale(LC_ALL, $g_lang); class InfoBlob { var $foo; - function InfoBlob() { + function __construct() { $this->foo = "Foo"; } } diff --git a/Zend/tests/bug20240.phpt b/Zend/tests/bug20240.phpt index acf673a277b..53bb0505761 100644 --- a/Zend/tests/bug20240.phpt +++ b/Zend/tests/bug20240.phpt @@ -9,7 +9,7 @@ class test { public $member; - function test() { + function __construct() { $this->member = 1; register_shutdown_function(array($this, 'destructor')); } diff --git a/Zend/tests/bug30080.phpt b/Zend/tests/bug30080.phpt index 8cac75ab8d2..ff4a82b21ff 100644 --- a/Zend/tests/bug30080.phpt +++ b/Zend/tests/bug30080.phpt @@ -3,7 +3,7 @@ Bug #30080 (Passing array or non array of objects) --FILE-- x; } } class Z extends Y { - function z() { + function __construct() { return ++$this->x; } } $a = new Z(); -$a->x(); +$a->__construct(); echo "DONE"; ?> --EXPECTF-- diff --git a/Zend/tests/bug65108.phpt b/Zend/tests/bug65108.phpt index d3e5a65b26e..23e1e856d7d 100644 --- a/Zend/tests/bug65108.phpt +++ b/Zend/tests/bug65108.phpt @@ -8,7 +8,7 @@ class C { } class B { - public function B() { + public function __construct() { $isCallable = is_callable(array(new C, 'f')); var_dump($isCallable); } diff --git a/Zend/tests/bug65322.phpt b/Zend/tests/bug65322.phpt index aab163d915e..b8b97dd7778 100644 --- a/Zend/tests/bug65322.phpt +++ b/Zend/tests/bug65322.phpt @@ -13,10 +13,12 @@ set_error_handler(function($_, $msg, $file) { new B; }); -eval('class A { function a() {} function __construct() {} }'); +/* This is just a particular example of a non-fatal compile-time error + * If this breaks in future, just find another example and use it instead */ +eval('abstract class foo { abstract static function bar(); }'); ?> --EXPECTF-- -string(50) "Redefining already defined constructor for class A" +string(%d) "Static function foo::bar() should not be abstract" string(%d) "%s(%d) : eval()'d code" string(1) "B" diff --git a/Zend/tests/errmsg_045.phpt b/Zend/tests/errmsg_045.phpt index b27f67ade4c..331425ad9c1 100644 --- a/Zend/tests/errmsg_045.phpt +++ b/Zend/tests/errmsg_045.phpt @@ -8,11 +8,13 @@ set_error_handler(function($_, $msg, $file) { echo $undefined; }); -eval('class A { function a() {} function __construct() {} }'); +/* This is just a particular example of a non-fatal compile-time error + * If this breaks in future, just find another example and use it instead */ +eval('abstract class foo { abstract static function bar(); }'); ?> --EXPECTF-- -string(50) "Redefining already defined constructor for class A" +string(%d) "Static function foo::bar() should not be abstract" string(%d) "%s(%d) : eval()'d code" Notice: Undefined variable: undefined in %s on line %d diff --git a/Zend/tests/get_class_methods_002.phpt b/Zend/tests/get_class_methods_002.phpt index 27da6e8d9b5..62f326c0531 100644 --- a/Zend/tests/get_class_methods_002.phpt +++ b/Zend/tests/get_class_methods_002.phpt @@ -24,7 +24,6 @@ new B; ?> --EXPECTF-- -Strict Standards: Redefining already defined constructor for class B in %s on line %d array(2) { [0]=> string(1) "a" diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 2a76ff39e66..ad696857b4d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3171,7 +3171,7 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type) /* {{ } /* }}} */ -zend_bool zend_is_constructor(zend_string *name) /* {{{ */ +static zend_bool zend_is_constructor(zend_string *name) /* {{{ */ { return zend_string_equals_literal_ci(name, ZEND_CONSTRUCTOR_FUNC_NAME); } @@ -4409,10 +4409,6 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo ce->constructor = (zend_function *) op_array; } } else if (zend_string_equals_literal(lcname, ZEND_CONSTRUCTOR_FUNC_NAME)) { - if (CG(active_class_entry)->constructor) { - zend_error(E_STRICT, "Redefining already defined constructor for class %s", - ce->name->val); - } ce->constructor = (zend_function *) op_array; } else if (zend_string_equals_literal(lcname, ZEND_DESTRUCTOR_FUNC_NAME)) { ce->destructor = (zend_function *) op_array; diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 3e9083c8a4e..fd40c8ed841 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -23,6 +23,7 @@ #include "zend_execute.h" #include "zend_inheritance.h" #include "zend_smart_str.h" +#include "zend_inheritance.h" static void ptr_dtor(zval *zv) /* {{{ */ { @@ -1596,6 +1597,9 @@ ZEND_API void zend_do_bind_traits(zend_class_entry *ce) /* {{{ */ /* verify that all abstract methods from traits have been implemented */ zend_verify_abstract_class(ce); + /* Emit E_DEPRECATED for PHP 4 constructors */ + zend_check_deprecated_constructor(ce); + /* now everything should be fine and an added ZEND_ACC_IMPLICIT_ABSTRACT_CLASS should be removed */ if (ce->ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) { ce->ce_flags -= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS; @@ -1603,6 +1607,29 @@ ZEND_API void zend_do_bind_traits(zend_class_entry *ce) /* {{{ */ } /* }}} */ + +static zend_bool zend_has_deprecated_constructor(const zend_class_entry *ce) /* {{{ */ +{ + const zend_string *constructor_name; + if (!ce->constructor) { + return 0; + } + constructor_name = ce->constructor->common.function_name; + return !zend_binary_strcasecmp( + ce->name->val, ce->name->len, + constructor_name->val, constructor_name->len + ); +} +/* }}} */ + +void zend_check_deprecated_constructor(const zend_class_entry *ce) /* {{{ */ +{ + if (zend_has_deprecated_constructor(ce)) { + zend_error(E_DEPRECATED, "Methods with the same name as their class will not be constructors in a future version of PHP; %s has a deprecated constructor", ce->name->val); + } +} +/* }}} */ + /* * Local variables: * tab-width: 4 diff --git a/Zend/zend_inheritance.h b/Zend/zend_inheritance.h index 7ec6231cd23..f7ad6dc0602 100644 --- a/Zend/zend_inheritance.h +++ b/Zend/zend_inheritance.h @@ -33,6 +33,8 @@ ZEND_API void zend_do_bind_traits(zend_class_entry *ce); ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce); void zend_do_early_binding(void); +void zend_check_deprecated_constructor(const zend_class_entry *ce); + END_EXTERN_C() #endif diff --git a/ext/mbstring/tests/mb_convert_variables.phpt b/ext/mbstring/tests/mb_convert_variables.phpt index 01ced051044..22253b5352c 100644 --- a/ext/mbstring/tests/mb_convert_variables.phpt +++ b/ext/mbstring/tests/mb_convert_variables.phpt @@ -76,7 +76,7 @@ class foo public $s2; public $s3; - function foo() + function __construct() { global $sjis, $jis, $euc_jp; @@ -92,7 +92,7 @@ class bar public $s2; public $s3; - function bar() + function __construct() { global $sjis, $jis, $euc_jp; diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt index 91cb9d022b4..58626be6723 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt @@ -177,7 +177,7 @@ require_once('skipifconnectfailure.inc'); class foo { public $foo; - function foo() { + function __construct() { $this->foo = &$this->bar; } } @@ -204,4 +204,4 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- -done! \ No newline at end of file +done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt index ee659d4b4ab..c297f8ff673 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt @@ -194,7 +194,7 @@ require_once('skipifconnectfailure.inc'); unset($bar); unset($id); unset($label_ref); class foo { public $foo; - public function foo() { + public function __construct() { $this->foo = &$this->bar; } } @@ -219,8 +219,8 @@ require_once('skipifconnectfailure.inc'); class mega_bar extends bar { private $id; public $id_ref; - public function mega_bar() { - $this->foo(); + public function __construct() { + parent::construct(); $this->id_ref = &$this->id; } } @@ -311,4 +311,4 @@ object(mega_bar)#5 (4) { [%u|b%"foo"]=> &%unicode|string%(1) "a" } -done! \ No newline at end of file +done! diff --git a/ext/pcre/tests/bug21758.phpt b/ext/pcre/tests/bug21758.phpt index 78a1d6a7475..db599196f2c 100644 --- a/ext/pcre/tests/bug21758.phpt +++ b/ext/pcre/tests/bug21758.phpt @@ -3,7 +3,7 @@ Bug #21758 (preg_replace_callback() not working with class methods) --FILE-- a = &$a; } } diff --git a/ext/session/tests/019.phpt b/ext/session/tests/019.phpt index 0f06add5a11..58250070006 100644 --- a/ext/session/tests/019.phpt +++ b/ext/session/tests/019.phpt @@ -15,7 +15,7 @@ error_reporting(E_ALL); class TFoo { public $c; - function TFoo($c) { + function __construct($c) { $this->c = $c; } function inc() { diff --git a/ext/session/tests/026.phpt b/ext/session/tests/026.phpt index f797286bf65..d29d6b57d26 100644 --- a/ext/session/tests/026.phpt +++ b/ext/session/tests/026.phpt @@ -21,7 +21,7 @@ class a { class b { public $a; - function b(&$a) { + function __construct(&$a) { $this->a = &$a; } } diff --git a/ext/soap/tests/any.phpt b/ext/soap/tests/any.phpt index 93a0e6693a8..7c0b7ff2527 100644 --- a/ext/soap/tests/any.phpt +++ b/ext/soap/tests/any.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt index 61a2213ef07..b78142d44ea 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014p.phpt @@ -7,7 +7,7 @@ precision=14 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt index b03cc1969ae..da78659a136 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt index 930c2771498..bb532f46d02 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt @@ -7,7 +7,7 @@ precision=14 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt index 46b8d7d7805..f4e24ad17ba 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt index edff0a4d9be..c27c783b35c 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- Age = $a; $this->ID = $i; $this->Name = $n; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt index b1a60df774f..8e418e1c008 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- Age = $a; $this->ID = $i; $this->Name = $n; @@ -16,7 +16,7 @@ class Person { } } class Employee { - function Employee($person=NULL,$id=NULL,$salary=NULL) { + function __construct($person=NULL,$id=NULL,$salary=NULL) { $this->person = $person; $this->ID = $id; $this->salary = $salary; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt index 2e74e7cfdad..74f0ec07282 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt index 26ce8de2827..e788ffefa3c 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt index 270b30fc925..ed0387a17e0 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt index 892ef456155..f732115b76f 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt index e4279fc883f..b2f740ce09c 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt index cc27d6f7b8c..63bd4c7cf1b 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt index 07b087ef461..11039c0f320 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->child = $c; diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt index efc25e272c5..053581dfa0e 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->child = $c; diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt index 705e2036ee1..982114cdeda 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->child = $c; diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt index 8d149a30482..4a0e0478569 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->child = $c; diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt index 9726f848e37..694eb1a7f24 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->child = $c; diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt index 27a0c9333cc..3e1593382bc 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt index 1ed1fe721c3..b2cb8161f65 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt index fde7d75e47c..3cf1236fc2e 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt @@ -8,21 +8,21 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt index d448974f2d1..1c07c32009e 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt index 52451acffca..c2710fc7429 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt index c9ad1c5f5dd..31976b740fc 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt index fac6c3b0695..9db050ad678 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt @@ -7,29 +7,29 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt index c020790b485..d420abe183d 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt @@ -7,29 +7,29 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt index f3a07d75e65..53c6b7fbc76 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt @@ -7,29 +7,29 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt index 55d62c1db2b..2e966e9a36f 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt @@ -7,29 +7,29 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->structMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt index bf867d9c129..c1695268d75 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt index 6ac7641e2b2..4bcdf1f441a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- floatMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt index dda5b69e296..ec52aece46f 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- floatMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt index e4b29176cb0..07cde239e85 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->floatMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt index 074b258ab68..a68957441f7 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->floatMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt index 8fd9b3948bd..bc0cef2ea20 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class BaseStruct { - function BaseStruct($f, $s) { + function __construct($f, $s) { $this->floatMessage = $f; $this->shortMessage = $s; } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt index f54c18842d9..fd2df8f4254 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt @@ -8,22 +8,22 @@ soap.wsdl_cache_enabled=0 --FILE-- floatMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt index d6f16a7bbce..cc1fc72b9c3 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt @@ -8,22 +8,22 @@ soap.wsdl_cache_enabled=0 --FILE-- floatMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt index 2bf73412ec7..1a2d950577f 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt @@ -8,22 +8,22 @@ soap.wsdl_cache_enabled=0 --FILE-- floatMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt index f1eeac2f267..906812e6b7f 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt @@ -8,22 +8,22 @@ soap.wsdl_cache_enabled=0 --FILE-- floatMessage = $f; $this->shortMessage = $s; } } class ExtendedStruct extends BaseStruct { - function ExtendedStruct($f, $s, $x1, $x2, $x3) { - $this->BaseStruct($f,$s); + function __construct($f, $s, $x1, $x2, $x3) { + parent::__construct($f,$s); $this->stringMessage = $x1; $this->intMessage = $x2; $this->anotherIntMessage = $x3; } } class MoreExtendedStruct extends ExtendedStruct { - function MoreExtendedStruct($f, $s, $x1, $x2, $x3, $b) { - $this->ExtendedStruct($f, $s, $x1, $x2, $x3); + function __construct($f, $s, $x1, $x2, $x3, $b) { + parent::__construct($f, $s, $x1, $x2, $x3); $this->booleanMessage = $b; } } diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt index d9dbed46bc8..2ebcabd1db6 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt index 41bf371202f..af0040f7832 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt index f3150b57407..4bcda95e387 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt index 6f070005722..490d903e5a6 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt index ea9bb0fe9c6..4630add1c43 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt index 1b6382c4478..0034ba82b03 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt index d312dbfac71..4afa56485b6 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt @@ -8,14 +8,14 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; } } class SOAPComplexTypeComplexType { - function SOAPComplexTypeComplexType($s, $i, $f, $c) { + function __construct($s, $i, $f, $c) { $this->varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt index dc4cdce6363..f30f1afb31f 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt index 9ff683188de..7b6d8eceb2e 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt index 5751a46e2c1..a5ff11a7b3a 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- varString = $s; $this->varInt = $i; $this->varFloat = $f; diff --git a/ext/standard/tests/array/007.phpt b/ext/standard/tests/array/007.phpt index e30b8fe2c1d..4a1270eca6c 100644 --- a/ext/standard/tests/array/007.phpt +++ b/ext/standard/tests/array/007.phpt @@ -53,7 +53,7 @@ error_reporting(E_ALL); class cr { private $priv_member; public $public_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; $this->public_member = $val; } diff --git a/ext/standard/tests/array/array_intersect_1.phpt b/ext/standard/tests/array/array_intersect_1.phpt index 41f20330fde..ce8fdd1cac0 100644 --- a/ext/standard/tests/array/array_intersect_1.phpt +++ b/ext/standard/tests/array/array_intersect_1.phpt @@ -6,7 +6,7 @@ error_reporting(E_ALL); class cr { private $priv_member; public $public_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; $this->public_member = $val; } diff --git a/ext/standard/tests/array/array_udiff_assoc_basic.phpt b/ext/standard/tests/array/array_udiff_assoc_basic.phpt index 769bafb76be..d115bcc3266 100644 --- a/ext/standard/tests/array/array_udiff_assoc_basic.phpt +++ b/ext/standard/tests/array/array_udiff_assoc_basic.phpt @@ -8,7 +8,7 @@ array_udiff_assoc(): Test return type and value for expected input */ class cr { private $priv_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; } static function comp_func_cr($a, $b) { @@ -38,4 +38,4 @@ array(3) { ["priv_member":"cr":private]=> int(23) } -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/array_udiff_basic.phpt b/ext/standard/tests/array/array_udiff_basic.phpt index 3da1b60c5c7..5dbece34cc2 100644 --- a/ext/standard/tests/array/array_udiff_basic.phpt +++ b/ext/standard/tests/array/array_udiff_basic.phpt @@ -8,7 +8,7 @@ array_udiff():Test return type and value for expected input */ class cr { private $priv_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; } static function comp_func_cr($a, $b) { @@ -33,4 +33,4 @@ array(2) { ["priv_member":"cr":private]=> int(23) } -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/array_udiff_uassoc_basic.phpt b/ext/standard/tests/array/array_udiff_uassoc_basic.phpt index 6095696f417..51b4bc17592 100644 --- a/ext/standard/tests/array/array_udiff_uassoc_basic.phpt +++ b/ext/standard/tests/array/array_udiff_uassoc_basic.phpt @@ -8,7 +8,7 @@ array_udiff_uassoc(): Test return type and value for expected input */ class cr { private $priv_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; } static function comp_func_cr($a, $b) { @@ -42,4 +42,4 @@ array(3) { ["priv_member":"cr":private]=> int(23) } -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/array_uintersect_assoc_basic.phpt b/ext/standard/tests/array/array_uintersect_assoc_basic.phpt index 7e9fff7875e..d3645c7ceaa 100644 --- a/ext/standard/tests/array/array_uintersect_assoc_basic.phpt +++ b/ext/standard/tests/array/array_uintersect_assoc_basic.phpt @@ -8,7 +8,7 @@ array_uintersect_assoc(): Test return type and value for expected input */ class cr { private $priv_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; } static function comp_func_cr($a, $b) { @@ -33,4 +33,4 @@ array(2) { ["priv_member":"cr":private]=> int(-15) } -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/array_uintersect_basic.phpt b/ext/standard/tests/array/array_uintersect_basic.phpt index 8d4b803589c..4965d599baf 100644 --- a/ext/standard/tests/array/array_uintersect_basic.phpt +++ b/ext/standard/tests/array/array_uintersect_basic.phpt @@ -8,7 +8,7 @@ array_uintersect(): Test return type and value for expected input */ class cr { private $priv_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; } static function comp_func_cr($a, $b) { @@ -38,4 +38,4 @@ array(3) { ["priv_member":"cr":private]=> int(-15) } -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/array_uintersect_uassoc_basic.phpt b/ext/standard/tests/array/array_uintersect_uassoc_basic.phpt index a474bc7ff58..5e1ea1a7d98 100644 --- a/ext/standard/tests/array/array_uintersect_uassoc_basic.phpt +++ b/ext/standard/tests/array/array_uintersect_uassoc_basic.phpt @@ -8,7 +8,7 @@ array_uintersect_uassoc(): Test return type and value for expected input */ class cr { private $priv_member; - function cr($val) { + function __construct($val) { $this->priv_member = $val; } static function comp_func_cr($a, $b) { @@ -37,4 +37,4 @@ array(2) { ["priv_member":"cr":private]=> int(-15) } -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/bug45312.phpt b/ext/standard/tests/array/bug45312.phpt index 017defefae9..858bdfa4bf6 100644 --- a/ext/standard/tests/array/bug45312.phpt +++ b/ext/standard/tests/array/bug45312.phpt @@ -4,7 +4,7 @@ Bug #45312 (Segmentation fault on second request for array functions) priv_member = $val; } static function comp_func_cr($a, $b) { diff --git a/ext/standard/tests/file/bug38450.phpt b/ext/standard/tests/file/bug38450.phpt index d108897988b..07e413b92b9 100644 --- a/ext/standard/tests/file/bug38450.phpt +++ b/ext/standard/tests/file/bug38450.phpt @@ -7,7 +7,7 @@ class VariableStream { var $position; var $varname; - function VariableStream($var) { + function __construct($var) { var_dump("constructor!"); } @@ -102,7 +102,7 @@ var_dump($myvar); echo "Done\n"; ?> --EXPECTF-- -Warning: Missing argument 1 for VariableStream::VariableStream() in %s on line %d +Warning: Missing argument 1 for VariableStream::__construct() in %s on line %d string(12) "constructor!" line1 line2 diff --git a/ext/standard/tests/file/lstat_stat_variation18.phpt b/ext/standard/tests/file/lstat_stat_variation18.phpt index fc98739fa7a..6ee563d6845 100644 --- a/ext/standard/tests/file/lstat_stat_variation18.phpt +++ b/ext/standard/tests/file/lstat_stat_variation18.phpt @@ -30,7 +30,7 @@ echo "*** Testing stat() with filename & directory name stored inside an object class names { public $var_name; - public function names($name) { + public function __construct($name) { $this->var_name = $name; } } diff --git a/ext/standard/tests/file/lstat_stat_variation20.phpt b/ext/standard/tests/file/lstat_stat_variation20.phpt index 30b81ad8b1a..8dcd70c7981 100644 --- a/ext/standard/tests/file/lstat_stat_variation20.phpt +++ b/ext/standard/tests/file/lstat_stat_variation20.phpt @@ -29,7 +29,7 @@ symlink("$file_path/lstat_stat_variation20.tmp", "$file_path/lstat_stat_variatio echo "*** Testing lstat() with linkname stored inside an object/array ***\n"; class names { public $var_name; - public function names($name) { + public function __construct($name) { $this->var_name = $name; } } diff --git a/ext/standard/tests/file/readlink_realpath_variation1.phpt b/ext/standard/tests/file/readlink_realpath_variation1.phpt index 9c795e97940..341e39a9dea 100644 --- a/ext/standard/tests/file/readlink_realpath_variation1.phpt +++ b/ext/standard/tests/file/readlink_realpath_variation1.phpt @@ -28,7 +28,7 @@ fclose($file_handle); // creating object with members as linkname class object_temp { public $linkname; - function object_temp($link) { + function __construct($link) { $this->linkname = $link; } } diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt index e3185c40360..b1b1afc7401 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt @@ -36,7 +36,7 @@ fclose($fp); echo "*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members in an object ***\n"; class object_temp { var $linkname; - function object_temp($link) { + function __construct($link) { $this->linkname = $link; } } diff --git a/ext/standard/tests/general_functions/debug_zval_dump_o.phpt b/ext/standard/tests/general_functions/debug_zval_dump_o.phpt index 4f286ec6061..1f2b7e155d5 100644 --- a/ext/standard/tests/general_functions/debug_zval_dump_o.phpt +++ b/ext/standard/tests/general_functions/debug_zval_dump_o.phpt @@ -39,7 +39,7 @@ class object_class { } public $array_var = array( "key1" => 1, "key2 " => 3); - function object_class () { + function __construct () { $this->value1 = 5; $this->object_class1 = $this; } @@ -65,7 +65,7 @@ class contains_object_class echo "func() is called \n"; } - function contains_object_class () { + function __construct () { $this->class_object1 = new object_class(); $this->class_object2 = new object_class(); $this->class_object3 = $this->class_object1; diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt index 43454733e8c..b2762fd83a3 100644 --- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt @@ -38,7 +38,7 @@ class point var $x; var $y; - function point($x, $y) { + function __construct($x, $y) { $this->x = $x; $this->y = $y; } diff --git a/ext/standard/tests/general_functions/is_callable_basic2.phpt b/ext/standard/tests/general_functions/is_callable_basic2.phpt index c900032fea5..d842534124b 100644 --- a/ext/standard/tests/general_functions/is_callable_basic2.phpt +++ b/ext/standard/tests/general_functions/is_callable_basic2.phpt @@ -71,7 +71,7 @@ class contains_object_class echo "func() is called \n"; } - function contains_object_class () { + function __construct () { $this->class_object1 = new object_class(); $this->no_member_class_object = new no_member_class(); } @@ -784,4 +784,4 @@ bool(true) object_class::foo1 bool(true) object_class::foo1 -===DONE=== \ No newline at end of file +===DONE=== diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt index 33fd422e769..89b5081fae4 100644 --- a/ext/standard/tests/general_functions/is_object.phpt +++ b/ext/standard/tests/general_functions/is_object.phpt @@ -61,7 +61,7 @@ class myClass private $private_var; protected $protected_var; - function myClass ( ) { + function __construct ( ) { $this->foo_object = new foo(); $this->public_var = 10; $this->public_var1 = new foo(); diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt index f3ebd58cc54..d62b3f97902 100644 --- a/ext/standard/tests/general_functions/print_r_64bit.phpt +++ b/ext/standard/tests/general_functions/print_r_64bit.phpt @@ -155,7 +155,7 @@ class object_class protected $protected_var1 = "string_1"; protected $protected_var2; - function object_class ( ) { + function __construct ( ) { $this->value = 50; $this->public_var2 = 11; $this->private_var2 = 21; @@ -191,7 +191,7 @@ class contains_object_class echo "func() is called \n"; } - function contains_object_class () { + function __construct () { $this->class_object1 = new object_class(); $this->class_object2 = new object_class(); $this->class_object3 = $this->class_object1; diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt index a81980c02bb..3672357936e 100644 --- a/ext/standard/tests/general_functions/var_dump_64bit.phpt +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -148,7 +148,7 @@ class object_class protected $protected_var1 = "string_1"; protected $protected_var2; - function object_class ( ) { + function __construct ( ) { $this->value = 50; $this->public_var2 = 11; $this->private_var2 = 21; @@ -184,7 +184,7 @@ class contains_object_class echo "func() is called \n"; } - function contains_object_class () { + function __construct () { $this->class_object1 = new object_class(); $this->class_object2 = new object_class(); $this->class_object3 = $this->class_object1; diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt index 76a18ac3a7d..1cadb4aa55d 100644 --- a/ext/standard/tests/general_functions/var_export-locale.phpt +++ b/ext/standard/tests/general_functions/var_export-locale.phpt @@ -233,7 +233,7 @@ class myClass private $private_var; protected $protected_var; - function myClass ( ) { + function __construct ( ) { $this->foo_object = new foo(); $this->public_var = 10; $this->public_var1 = new foo(); diff --git a/ext/standard/tests/general_functions/var_export_basic6.phpt b/ext/standard/tests/general_functions/var_export_basic6.phpt index 8935d0e79d7..38fdb373dfc 100644 --- a/ext/standard/tests/general_functions/var_export_basic6.phpt +++ b/ext/standard/tests/general_functions/var_export_basic6.phpt @@ -61,7 +61,7 @@ class myClass private $private_var; protected $protected_var; - function myClass ( ) { + function __construct ( ) { $this->foo_object = new foo(); $this->public_var = 10; $this->public_var1 = new foo(); diff --git a/ext/standard/tests/serialize/001.phpt b/ext/standard/tests/serialize/001.phpt index 600c9b706d9..e83b9af002e 100644 --- a/ext/standard/tests/serialize/001.phpt +++ b/ext/standard/tests/serialize/001.phpt @@ -6,7 +6,7 @@ serialize_precision=100 a = "hallo"; } @@ -18,7 +18,7 @@ class s public $b; public $c; - function s() + function __construct() { $this->a = "hallo"; $this->b = "php"; diff --git a/ext/standard/tests/serialize/bug14293.phpt b/ext/standard/tests/serialize/bug14293.phpt index 3fca7e406ed..8e7b8a9d7d3 100644 --- a/ext/standard/tests/serialize/bug14293.phpt +++ b/ext/standard/tests/serialize/bug14293.phpt @@ -4,7 +4,7 @@ Bug #14293 (serialize() and __sleep()) a = 'hello'; } diff --git a/ext/standard/tests/serialize/bug21957.phpt b/ext/standard/tests/serialize/bug21957.phpt index 29eeb2ee6c7..2084503d243 100644 --- a/ext/standard/tests/serialize/bug21957.phpt +++ b/ext/standard/tests/serialize/bug21957.phpt @@ -6,7 +6,7 @@ class test { public $a, $b; - function test() + function __construct() { $this->a = 7; $this->b = 2; diff --git a/ext/standard/tests/serialize/serialization_objects_003.phpt b/ext/standard/tests/serialize/serialization_objects_003.phpt index 2313ffab883..5e6773a2ae4 100644 --- a/ext/standard/tests/serialize/serialization_objects_003.phpt +++ b/ext/standard/tests/serialize/serialization_objects_003.phpt @@ -19,7 +19,7 @@ echo "\n--- Testing Abstract Class ---\n"; // abstract class abstract class Name { - public function Name() { + public function __construct() { $this->a = 10; $this->b = 12.222; $this->c = "string"; diff --git a/ext/tidy/tests/027.phpt b/ext/tidy/tests/027.phpt index 8d9f66eaf71..cd984dd9e7d 100644 --- a/ext/tidy/tests/027.phpt +++ b/ext/tidy/tests/027.phpt @@ -10,7 +10,7 @@ Bug: tidy segfaults with markup=false abstract class BaseClass { private static $tidyconfig; - public function BaseClass() { + public function __construct() { $this->tidyconfig = array( 'indent' => false, 'clean' => true, @@ -38,7 +38,7 @@ abstract class BaseClass { } class ChildClass extends BaseClass { - public function ChildClass() { + public function __construct() { parent::__construct(); } diff --git a/ext/xml/tests/bug32001.phpt b/ext/xml/tests/bug32001.phpt index 0853b3ab1c1..b5d2a7b0bd6 100644 --- a/ext/xml/tests/bug32001.phpt +++ b/ext/xml/tests/bug32001.phpt @@ -14,7 +14,7 @@ class testcase { private $tags; private $chunk_size; - function testcase($enc, $chunk_size = 0, $bom = 0, $omit_prologue = 0) { + function __construct($enc, $chunk_size = 0, $bom = 0, $omit_prologue = 0) { $this->encoding = $enc; $this->chunk_size = $chunk_size; $this->bom = $bom; diff --git a/tests/classes/clone_006.phpt b/tests/classes/clone_006.phpt index de22fec1519..15f0a5ec523 100644 --- a/tests/classes/clone_006.phpt +++ b/tests/classes/clone_006.phpt @@ -10,7 +10,7 @@ error_reporting=2047 class MyCloneable { static $id = 0; - function MyCloneable() { + function __construct() { $this->id = self::$id++; } diff --git a/tests/classes/ctor_dtor.phpt b/tests/classes/ctor_dtor.phpt index ea6813cc96d..6af863e5768 100644 --- a/tests/classes/ctor_dtor.phpt +++ b/tests/classes/ctor_dtor.phpt @@ -6,7 +6,7 @@ ZE2 The new constructor/destructor is called early(); +$t->__construct(); unset($t); $t = new late(); //unset($t); delay to end of script @@ -32,8 +32,8 @@ $t = new late(); echo "Done\n"; ?> --EXPECTF-- -early::early -early::early +early::__construct +early::__construct early::__destruct late::__construct Done diff --git a/tests/classes/dereferencing_001.phpt b/tests/classes/dereferencing_001.phpt index dd2aba78e57..886baeb2880 100644 --- a/tests/classes/dereferencing_001.phpt +++ b/tests/classes/dereferencing_001.phpt @@ -6,7 +6,7 @@ ZE2 dereferencing of objects from methods name = $_name; } @@ -18,7 +18,7 @@ class Name { class Person { private $name; - function person($_name, $_address) { + function __construct($_name, $_address) { $this->name = new Name($_name); } diff --git a/tests/classes/object_reference_001.phpt b/tests/classes/object_reference_001.phpt index 74acb5de136..f114d1aa954 100644 --- a/tests/classes/object_reference_001.phpt +++ b/tests/classes/object_reference_001.phpt @@ -8,7 +8,7 @@ ZE2 object references class Foo { public $name; - function Foo() { + function __construct() { $this->name = "I'm Foo!\n"; } } diff --git a/tests/lang/028.phpt b/tests/lang/028.phpt index bd4525ee60e..2c51b79cb25 100644 --- a/tests/lang/028.phpt +++ b/tests/lang/028.phpt @@ -28,7 +28,7 @@ function dafna() class dafna_class { - function dafna_class() { + function __construct() { $this->myname = "Dafna"; } function GetMyName() { diff --git a/tests/lang/030.phpt b/tests/lang/030.phpt index 758369bf084..9ee40ea5aab 100644 --- a/tests/lang/030.phpt +++ b/tests/lang/030.phpt @@ -3,7 +3,7 @@ $this in constructor test --FILE-- Name = $name; $GLOBALS['List']->echoName(); diff --git a/tests/lang/035.phpt b/tests/lang/035.phpt index 9472999f471..a5e3a7f4cc9 100644 --- a/tests/lang/035.phpt +++ b/tests/lang/035.phpt @@ -5,7 +5,7 @@ ZE2: set_exception_handler() --FILE-- error = $_error; } diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt index bee3688d66b..a3fdd297e13 100644 --- a/tests/lang/bug20175.phpt +++ b/tests/lang/bug20175.phpt @@ -95,7 +95,7 @@ $oop_global = 0; class oop_class { var $oop_name; - function oop_class() { + function __construct() { global $oop_global; echo "oop_class()\n"; $this->oop_name = 'oop:' . ++$oop_global; @@ -105,7 +105,7 @@ class oop_class { class oop_test { static $oop_value; - function oop_test() { + function __construct() { echo "oop_test()\n"; } diff --git a/tests/lang/bug21849.phpt b/tests/lang/bug21849.phpt index 30b311320be..2ce99769d9b 100644 --- a/tests/lang/bug21849.phpt +++ b/tests/lang/bug21849.phpt @@ -5,7 +5,7 @@ Bug #21849 (self::constant doesn't work as method's default parameter) class foo { const bar = "fubar\n"; - function foo($arg = self::bar) { + function __construct($arg = self::bar) { echo $arg; } } diff --git a/tests/lang/bug21961.phpt b/tests/lang/bug21961.phpt index 24581d663e8..9b7199208da 100644 --- a/tests/lang/bug21961.phpt +++ b/tests/lang/bug21961.phpt @@ -8,7 +8,7 @@ Bug #21961 (get_parent_class() segfault) class man { public $name, $bars; - function man() + function __construct() { $this->name = 'Mr. X'; $this->bars = array(); @@ -29,7 +29,7 @@ class bar extends man { public $name; - function bar($w) + function __construct($w) { $this->name = $w; } diff --git a/tests/lang/bug23489.phpt b/tests/lang/bug23489.phpt index 645bb1b7df3..c8535c51232 100644 --- a/tests/lang/bug23489.phpt +++ b/tests/lang/bug23489.phpt @@ -3,7 +3,7 @@ Bug #23489 (ob_start() is broken with method callbacks) --FILE-- errno = $_errno; $this->errmsg = $_errmsg; }