fix(compiler): discover native globals with case-insensitive keywords (#124) --skip-tests
parent
b3898c329d
commit
f84d20e346
5 changed files with 64 additions and 3 deletions
@ -0,0 +1,7 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
function initializeCaseSlot(): void |
||||||
|
{ |
||||||
|
GlObAl $caseSlot; |
||||||
|
$caseSlot = new NativeCaseValue(); |
||||||
|
} |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
#[Native] |
||||||
|
class NativeCaseValue |
||||||
|
{ |
||||||
|
public int $value = 42; |
||||||
|
} |
||||||
|
|
||||||
|
function readCaseSlot(): int |
||||||
|
{ |
||||||
|
global $caseSlot; |
||||||
|
return $caseSlot->value; |
||||||
|
} |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
function initializeCaseSlot(): void |
||||||
|
{ |
||||||
|
GLOBAL $caseSlot; |
||||||
|
$caseSlot = new NativeCaseValue(); |
||||||
|
} |
||||||
Loading…
Reference in new issue