8000 Add support for retrieving default values of parameters of internal f… · php/php-src@4aae4e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4aae4e8

Browse files
committed
Add support for retrieving default values of parameters of internal functions
1 parent 86780ff commit 4aae4e8

File tree

119 files changed

+1519
-1215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1519
-1215
lines changed

Zend/tests/argument_restriction_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ class Sub extends Base {
1313
}
1414
?>
1515
--EXPECTF--
16-
Fatal error: Declaration of & Sub::test() must be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d
16+
Fatal error: Declaration of & Sub::test() must be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'lllllllllllllllllllllllllllllllllllllllllllllllllll') in %sargument_restriction_001.php on line %d

Zend/tests/argument_restriction_003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ class Sub extends Base {
1616
}
1717
?>
1818
--EXPECTF--
19-
Fatal error: Declaration of Sub::test() must be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_003.php on line %d
19+
Fatal error: Declaration of Sub::test() must be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'lllllllllllllllllllllllllllllllllllllllllllllllllll') in %sargument_restriction_003.php on line %d

Zend/tests/argument_restriction_006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ class Sub extends Base {
1313
}
1414
?>
1515
--EXPECTF--
16-
Fatal error: Declaration of Sub::test($foo, $extra) must be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
16+
Fatal error: Declaration of Sub::test($foo, $extra) must be compatible with Base::test($foo, $extra = ['test']) in %sargument_restriction_006.php on line %d

Zend/tests/bug64988.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ $o = new Smooth1();
2626
echo "okey";
2727
?>
2828
--EXPECTF--
29-
Fatal error: Declaration of Smooth1::insert(array $data) must be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 17
29+
Fatal error: Declaration of Smooth1::insert(array $data) must be compatible with Noisy1::insert(array $data, $option1 = Null) in %sbug64988.php on line 17

Zend/tests/bug70957.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ class B extends Foo
1919
}
2020
?>
2121
--EXPECTF--
22-
Fatal error: Declaration of T::bar() must be compatible with Foo::bar($a = 'Foo') in %sbug70957.php on line %d
22+
Fatal error: Declaration of T::bar() must be compatible with Foo::bar($a = self::class) in %sbug70957.php on line %d

Zend/tests/bug71428.1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ class B extends A {
99
public function m(array $a = []) {}
1010
}
1111
--EXPECTF--
12-
Fatal error: Declaration of B::m(array $a = Array) must be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 6
12+
Fatal error: Declaration of B::m(array $a = []) must be compatible with A::m(?array $a = null) in %sbug71428.1.php on line 6

Zend/tests/bug72119.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ class Hello implements Foo {
1515
echo "OK\n";
1616
?>
1717
--EXPECTF--
18-
Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d
18+
Fatal error: Declaration of Hello::bar(array $baz = []) must be compatible with Foo::bar(?array $baz = null) in %s on line %d

Zend/tests/bug73987.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ class B extends A {
1515

1616
?>
1717
--EXPECTF--
18-
Fatal error: Declaration of B::example($a, $b, $c = NULL) must be compatible with A::example($a, $b = NULL, $c = NULL) in %s
18+
Fatal error: Declaration of B::example($a, $b, $c = null) must be compatible with A::example($a, $b = null, $c = null) in %s

Zend/tests/bug73987_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ class C extends B {
1717

1818
?>
1919
--EXPECTF--
20-
Fatal error: Declaration of C::example($a, $b, $c = NULL) must be compatible with B::example($a, $b = NULL, $c = NULL) in %s
20+
Fatal error: Declaration of C::example($a, $b, $c = null) must be compatible with B::example($a, $b = null, $c = null) in %s

Zend/tests/closures/closure_from_callable_basic.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $foo = new SubFoo;
8181
$fn = $foo->getSelfColonParentPublicInstanceMethod();
8282
echo $fn(" OK".PHP_EOL);
8383

84-
echo 'Access proteced instance method of parent object through "self::" to parent method';
84+
echo 'Access protected instance method of parent object through "self::" to parent method';
8585
$foo = new SubFoo;
8686
$fn = $foo->getSelfColonParentProtectedInstanceMethod();
8787
echo $fn(" OK".PHP_EOL);
@@ -114,6 +114,6 @@ Subclass closure over parent class static protected method OK
114114
Access public instance method of parent object through "parent::" OK
115115
Access public instance method of self object through "self::" OK
116116
Access public instance method of parent object through "self::" to parent method OK
117-
Access proteced instance method of parent object through "self::" to parent method OK
117+
Access protected instance method of parent object through "self::" to parent method OK
118118
MagicCall __call instance method __call,nonExistentMethod, OK
119119
MagicCall __callStatic static method __callStatic,nonExistentMethod, OK

0 commit comments

Comments
 (0)
0