1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00
Files
archived-php-src/Zend/tests/bug81684.phpt
Ilija Tovilo dab6226cbe Fix invalid opcode for ??= on $GLOBALS
Closes #81684
Closes GH-7717
2021-12-05 18:25:02 +01:00

12 lines
215 B
PHP

--TEST--
Bug #81684: ??= on $GLOBALS produces an invalid opcode
--FILE--
<?php
$GLOBALS['x'] ??= 'x'; // Fatal error: Invalid opcode 23/1/0
var_dump($GLOBALS['x']);
echo "Done.\n";
?>
--EXPECT--
string(1) "x"
Done.