PHP Berserker

PHP Berserker have only one objective, and is to group all functions in classes to make the programming process more comfortable.

Berserk will not give new functionalities for your program, but you could go directly to the function you want with it.

For example: you want a function of string. With Berserker, you could do bString:: and the IDE you use give you all the functions for strings that berserk have that are PHP functions for strings.

¿Why Berserker? Well, the name sound good to me.

¿And the project? – Golang and other language like Python you can easily get the function that are in the packages or modules respectively. Why in PHP not, why not use the power of your IDE to tell you what function could you use here.

¿Why this Project? – I want to give centralized access to the functions like in package, and the second reason is why not.

¿State of the Project? – Alpha 1.0.1 /open source

IMPORTANT: You will need at least PHP 8.1.0 to run berserker

Old version and Composer version

old-version

In order to use the old version, you need to download it at the GitHub

the berserker.php will load the following classes: bString.php, bArrays.php and bFilters for now.

Berserker use these flags BERSERKER_STATIC and BERSERKER_IMETHOD to determine if use static clasess or Instance Methods you can change these flag a t berserker.php

I added an index.php as an example

Composer version

Composer version is the default you can directly use it if you are making a project that use composer, please don’t use v1.0.0-Alpha that’s a version with problems instead use 1.0.1-Alpha

The state of alpha is cause that the project need to add some native functions to the berserker classes, as soon as I add that classes the project will be beta

how can I use it?

require 'vendor/autoload.php';
use Berserker\Berserker;
$berserker = new Berserker();// you can use new Berserker() too instead of assigning berserker to a varaible

On composer version, you can use instantiated methods too while you add a string parameter while you are invoking Berserker, could it what ever you want but i recommend you to use “IMETHOD” instead of using whatever you want.

new Berserker("x");

Berserker classes

bStrings – 2 classes that simulates a package for string functions. You can see the native string function suported at https://blastcoding.com/en/berserker-php-string-functions-supported/

bArrays – 2 classes that simulate a package for array functions. Native functions supported are here https://blastcoding.com/en/berserker-php-array-functions-supported/

bFilters – 2 classes that simulate a package for filter functions.