-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #252 - $argc and $argv as function arguments
- Loading branch information
Showing
9 changed files
with
108 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...e.php.core/src/org/eclipse/php/internal/core/language/PHPVariablesInitializerPHP_8_0.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2015 Dawid Pakuła and others. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Dawid Pakuła - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.php.internal.core.language; | ||
|
||
import java.util.Collection; | ||
|
||
public class PHPVariablesInitializerPHP_8_0 extends PHPVariablesInitializerPHP_5_4 { | ||
|
||
@Override | ||
public void initializeSuperGlobals(Collection<String> superGlobals) { | ||
super.initializeSuperGlobals(superGlobals); | ||
superGlobals.remove("$php_errormsg"); | ||
} | ||
|
||
@Override | ||
public void initializeGlobals(Collection<String> globals) { | ||
super.initializeGlobals(globals); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ field(_REQUEST) | |
field(_SERVER) | ||
field(_SESSION) | ||
field(GLOBALS) | ||
|
||
field(php_errormsg) | ||
field(http_response_header) |
8 changes: 8 additions & 0 deletions
8
tests/org.eclipse.php.core.tests/workspace/errors/php7/globalVariableAsFunctionName.pdtt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--TEST-- | ||
--FILE-- | ||
<?php | ||
function functionWithGlobal($argc, $argv) {} | ||
function functionWithGlobal($_GET) {} | ||
?> | ||
--EXPECT-- | ||
[line=3, start=79, end=84] Cannot re-assign auto-global variable $_GET |