summaryrefslogtreecommitdiff
path: root/ext/intl/tests/bug48227.phpt
blob: 0ac0d5e55541fb6d02b84019f91ee7cd568a3ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #48227 (NumberFormatter::format leaks memory)
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php

$x = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
var_dump($x->format(''));
var_dump($x->format(1));
var_dump($x->format(NULL));
var_dump($x->format($x));

?>
--EXPECTF--
string(1) "0"
string(1) "1"
string(1) "0"

Notice: Object of class NumberFormatter could not be converted to int in %s on line %d
string(1) "1"