O
O
Oleg Matrozov2012-07-19 19:23:57
PHP
Oleg Matrozov, 2012-07-19 19:23:57

Bug in official php build for CentOS?

Given: PHP 5.3.14 CentOS x86_64

$fmt = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
  
  $fmt->setSymbol(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL,  ',');
  $fmt->setSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL, '');

  $fmt->parse('100,00', NumberFormatter::TYPE_DOUBLE);

On the $fmt->parse... line, php just goes into itself and falls off on the execution timeout. This behavior is known to be caused by resetting GROUPING_SEPARATOR_SYMBOL to an empty symbol. On another server with php 5.3.13 Gentoo x86_64 everything was fine. Does anyone else have it reproduced?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
marklarius, 2012-07-19
@marklarius

same thing.
CentOS release 5.8 (Final) Linux xxx 2.6.18-308.1.1.el5 #1 SMP Wed Mar 7 04:16:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux PHP 5.3.14 (cli) (built: Jun 25 2012 11:39:59)

D
Dmitry Serzhenko, 2012-07-22
@Serzhenko

Linux cs5683.selectel.ru 2.6.18-274.7.1.el5.028stab095.1 #1 SMP Mon Oct 24 20:49:24 MSD 2011 i686 i686 i386 GNU/Linux
PHP 5.3.15 (cli) (built: Jul 20 2012 13:20:39) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
Reproduced.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question