mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
PHP8: new str_* function
This commit is contained in:
parent
69385e16f2
commit
1275a4558c
7 changed files with 15 additions and 15 deletions
|
|
@ -140,7 +140,7 @@ function arguments($args){
|
|||
foreach($args as $arg){
|
||||
|
||||
// Is it a command? (prefixed with --)
|
||||
if(substr($arg, 0, 2) === '--'){
|
||||
if(str_starts_with($arg, '--')){
|
||||
|
||||
$value = preg_split('/[= ]/', $arg, 2);
|
||||
$com = substr(array_shift($value), 2);
|
||||
|
|
@ -152,7 +152,7 @@ function arguments($args){
|
|||
}
|
||||
|
||||
// Is it a flag? (prefixed with -)
|
||||
if(substr($arg, 0, 1) === '-'){
|
||||
if(str_starts_with($arg, '-')){
|
||||
$ret['flags'][] = substr($arg, 1);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue