mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
php5 is dead, reverted some teleport tweaks, nullsafe is deprecated, cactus hitbox is fixed
This commit is contained in:
parent
2e374fb09c
commit
0c8b56e22b
11 changed files with 35 additions and 58 deletions
|
|
@ -62,19 +62,11 @@ function kill($pid){
|
|||
}
|
||||
}
|
||||
|
||||
if(version_compare(PHP_VERSION, '7.0.0') >= 0){ //php > 7.0
|
||||
eval('
|
||||
function nullsafe(&$a, $null){
|
||||
return $a ?? $null;
|
||||
}
|
||||
');
|
||||
|
||||
}else{
|
||||
eval('
|
||||
function nullsafe(&$value, $null){
|
||||
return isset($value) ? $value : $null;
|
||||
}
|
||||
'); //behavior will change if you replace ' with ".
|
||||
/**
|
||||
* @deprecated Use $a ?? $null
|
||||
*/
|
||||
function nullsafe(&$a, $null){
|
||||
return $a ?? $null;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue