Download the PHP package ahamed/jsphp without Composer
On this page you can find all versions of the php package ahamed/jsphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package jsphp
Short Description A php library for implementing Array, Object, String methods in JavaScript way.
License MIT
Informations about the package jsphp
Why this library?
While using php Array methods it feels troublesome because of their unstructured patterns.
For example, you are using the array_map
and the array_filter
methods of php. At the time of using, you may notice that for the array_map
method, the $callback
comes as the first parameter of the method, then the $array
but for the array_filter
method, the $array
comes first then the $callback
. And this mixed structure exists everywhere.
Then I've discovered that the JavaScript uses a good pattern for these cases and I am also a big fan of JavaScript. That's why I've decided to build this library. I can say that the JavaScript lovers can get the pure feelings of JavaScript by using this and the JavaScript non-lovers also get the advantage of the good structure of array manipulations.
Future Journey
Currently I've covered only the array
methods. In near future I will add the object
and string
methods.
Installation
composer
is needed for installing the package. If you have composer installed then run the command.
Usage
After successful installation, include the library into your project.
Documentation
For writing this documentation I've followed the MDN a lot. Thanks to MDN, this site helps me to learn a lot of JS.
Follow the wiki pages for the details documentation.
Testing
You can run PHPUnit
testing and PHP_CodeSniffer
.
-
For running unit test
- For running phpcs test