giggsey / libphonenumber-for-php-lite Goto Github PK
View Code? Open in Web Editor NEWPHP version of Google's phone number handling library
Home Page: https://giggsey.com/libphonenumber/
License: Apache License 2.0
PHP version of Google's phone number handling library
Home Page: https://giggsey.com/libphonenumber/
License: Apache License 2.0
I have a blocker for migrating to libphonenumber-for-php-lite, which is a requirement for ShortNumberInfo.
The metadata for these files in libphonenumber is ~500KB (in comparison, PhoneNumberMetadata is ~1.1MB), and I think I can reduce that by removing empty data from the metadata (as well as the normal short arrays).
My question to the community is: should I? It'll increase the download size of the 'lite' library (current zip is ~300KB, this will go up slightly).
The alternative is creating another library just for the ShortNumberInfo, and have it require the lite package. But that comes with management overhead for me.
PhoneNumberUtil::getInstance()
create a exception when it's use without PhoneNumberUtil::resetInstance();
before , the message exception is "exception": "[object] (Error(code: 0): Typed static property libphonenumber\\PhoneNumberUtil::$instance must not be accessed before initialization at /var/task/vendor/giggsey/libphonenumber-for-php-lite/src/PhoneNumberUtil.php:387)
When I use PhoneNumberUtil::getInstance()
function, I have a other message like that : PHP message: PHP Deprecated: Optional parameter $defaultRegionMetadata declared before required parameter $phoneNumber is implicitly treated as a required parameter in /var/task/vendor/giggsey/libphonenumber-for-php-lite/src/PhoneNumberUtil.php on line 1795
PhoneNumberUtil::getInstance()
must be use without PhoneNumberUtil::resetInstance()
first time$defaultRegionMetadata
should not be to have a default valueWould the metadata loading be quicker & smaller if we serialised or var_exported the object itself?
Test:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.