giggsey / libphonenumber-for-php

PHP version of Google's phone number handling library
https://giggsey.com/libphonenumber/
Apache License 2.0
4.76k stars 468 forks source link

might have issue with german numbers #608

Closed victusfate closed 11 months ago

victusfate commented 11 months ago

test number 491 602229999 country string DE

generates the following:

Format  Value
E164    +49491602229999
National    0491 602229999
International   +49 491 602229999
RFC3966 tel:+49-491-602229999

or in the code

        $numberProto = $phoneUtil->parse('491602229999', 'DE');
        $number = $phoneUtil->format($numberProto, PhoneNumberFormat::E164);
        // $number 's value is +49491602229999 but I expect +491602229999
victusfate commented 11 months ago

nvm I forgot to add the '+'. when using it a second time