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/datefmt_parse_localtime_references.phpt
2025-04-27 11:31:35 +02:00

36 lines
658 B
PHP

--TEST--
datefmt_parse/datefmt_localtime references type system
--EXTENSIONS--
intl
--FILE--
<?php
class Test {
public float $prop = 1.0;
}
$test = new Test;
$offset1 =& $test->prop;
$offset2 =& $test->prop;
$fmt = datefmt_create(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
datefmt_localtime($fmt, 'Wednesday, December 31, 1969 4:00:00 PM PT', $offset1);
datefmt_parse($fmt, 'Wednesday, December 31, 1969 4:00:00 PM PT', $offset2);
var_dump($offset1, $offset2);
var_dump($test);
?>
--EXPECT--
float(1)
float(1)
object(Test)#1 (1) {
["prop"]=>
&float(1)
}