Annotation of embedaddon/php/ext/intl/tests/bug48227.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #48227 (NumberFormatter::format leaks memory)
                      3: --SKIPIF--
                      4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: $x = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
                      9: var_dump($x->format(''));
                     10: var_dump($x->format(1));
                     11: var_dump($x->format(NULL));
                     12: var_dump($x->format($x));
                     13: 
                     14: ?>
                     15: --EXPECTF--
                     16: string(1) "0"
                     17: string(1) "1"
                     18: string(1) "0"
                     19: 
                     20: Notice: Object of class NumberFormatter could not be converted to int in %s on line %d
                     21: string(1) "1"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>