drewm / morse Goto Github PK
View Code? Open in Web Editor NEWA feature detection library for PHP code that needs to run in multiple different environments
License: MIT License
A feature detection library for PHP code that needs to run in multiple different environments
License: MIT License
https://github.com/drewm/morse-php/blob/master/src/Feature/String.php#L25
Why are you testing for this if you minimum supported php version is 5.3?
Hi
In which section I should include the extension ctype (Character type checking)?
Do you think better create a section "type-related" or include ctype in string section?
I was wondering whether adding feature checks for things like "running on Laravel" or "running on WordPress" are out of scope for the library?
E.g.
if (Morse::featureExists('framework/laravel') {
...
} elseif (Morse::featureExists('cms/wordpress') {
...
} else {
...
}
Hello,
I would like to have functionality to check for some system functions availability
The functions i want to check are
ini_set
set_time_limit
exec
shell_exec
ignore_user_abort
passthru
system
popen
proc_open
On some hosts those functions are disabled with the disable_functions
setting in php.ini
Maybe the system functions deserve a namespace like system/ini_set , etc
Currently i am using very simple way to check but i would like to see support for those functions in the morse-php library, so i can include it in my project
// example way to check
$disabled = ini_get('disable_functions');
if (!strstr($disabled, 'ini_set')){
ini_set('memory_limit', '512M');
}
if (!strstr($disabled, 'set_time_limit')) {
set_time_limit(600);
}
if (!strstr($disabled, 'ignore_user_abort')) {
ignore_user_abort();
}
I'm really not sure prefixing the method names in the src/Feature
directory with "test" is a good idea. Its a little/really misleading when the tests are also all prefixed with "test".
In which group I can chech the INTL extension?
http://php.net/manual/en/intl.installation.php
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.