1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/intl/tests/numfmt_parse_currency_references.phpt
Niels Dossche e3cac07a9b Fix numfmt_parse_currency() reference handling
Closes GH-18472.
2025-05-01 10:39:53 +02:00

21 lines
434 B
PHP

--TEST--
numfmt_parse_currency() reference handling
--EXTENSIONS--
intl
--FILE--
<?php
class Test {
public int $prop = 1;
}
$test = new Test;
$fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY );
$num = "1\xc2\xa0$";
try {
numfmt_parse_currency($fmt, $num, $test->prop);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot assign string to reference held by property Test::$prop of type int