Skip to content

Commit

Permalink
Parameters with duplicate names are not allowed anymore in PHP7.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Aug 15, 2014
1 parent 3bd32ef commit b01b971
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 2 additions & 9 deletions Zend/tests/bug54013.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #54013 (ReflectionParam for duplicate parameter contains garbage)
Bug #54013 (ReflectionParam for duplicate parameter contains garbage) (PHP7)
--FILE--
<?php

@@ -21,11 +21,4 @@ var_dump($params[0], $params[1]);

?>
--EXPECTF--
object(ReflectionParameter)#%d (1) {
["name"]=>
string(8) "aaaaaaaa"
}
object(ReflectionParameter)#%d (1) {
["name"]=>
string(8) "aaaaaaaa"
}
Fatal error: Redefinition of parameter aaaaaaaa in %sbug54013.php on line 5
6 changes: 3 additions & 3 deletions Zend/tests/bug64515.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
Bug #64515 (Memoryleak when using the same variablename 2times in function declaration) (PHP7)
--FILE--
<?php
function foo($unused = null, $unused = null, $arg = array()) {
@@ -8,5 +8,5 @@ function foo($unused = null, $unused = null, $arg = array()) {
foo();
echo "okey";
?>
--EXPECT--
okey
--EXPECTF--
Fatal error: Redefinition of parameter unused in %sbug64515.php on line 2

0 comments on commit b01b971

Please sign in to comment.