Skip to content

Commit 2149f01

Browse files
committed
fix: add updated signature for getenv
Add the following signature for `getenv`: getenv(?string $name = null, bool $local_only = false): string|array|false to the function map (specifically for PHP 8 and above). This replaces all existing signatures, and should fix [13065][1]. [1]: phpstan/phpstan#13065
1 parent d4107e4 commit 2149f01

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

resources/functionMap_php80delta.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
'forward_static_call_array' => ['mixed', 'function'=>'callable', 'parameters'=>'array<int|string,mixed>'],
5454
'get_debug_type' => ['string', 'var'=>'mixed'],
5555
'get_resource_id' => ['int', 'res'=>'resource'],
56+
'getenv' => ['string|array<string,string>|false', 'name='=>'string|null', 'local_only='=>'bool'],
5657
'gmdate' => ['string', 'format'=>'string', 'timestamp='=>'int'],
5758
'gmmktime' => ['int|false', 'hour'=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
5859
'hash' => ['non-falsy-string', 'algo'=>'string', 'data'=>'string', 'raw_output='=>'bool'],

0 commit comments

Comments
 (0)