PHP Utils is a collection of native PHP functions ported to TypeScript. It was originally developed as part of the Laravel Helpers package, but is now a standalone package. Some functions do not include all the functionality of their native versions, so if you see something missing or would like another function added, please submit a pull request! The full list of functions is too many to list here, but you can check out the src file and do a simple search to see what's available.
npm i @balboacodes/php-utils
import { preg_split } from @balboacodes/php-utils;
const parts = preg_split('/[\\s,]+/', 'hypertext language, programming'); // ['hypertext', 'language', 'programming']If you like this package, be sure to check out our other packages.