PHP code example of xenokore / utility

1. Go to this page and download the library: Download xenokore/utility library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xenokore / utility example snippets


ArrayHelper::set(array &$array, string $key, mixed $value): array

ArrayHelper::get(array $array, string $key, $default = null, bool $throw = false): mixed

ArrayHelper::isAccessible(mixed $value): bool

ArrayHelper::exists(array $array, string|int $key)

ArrayHelper::convertDotNotationToArray(array $array): array

ArrayHelper::convertArrayToDotNotation(array $array): array

ArrayHelper::moveToTop(array &$array, string $key): void

ArrayHelper::moveToBottom(array &$array, string $key): void

ArrayHelper::mergeRecursiveDistinct(array $array1, array $array2): array

ArrayHelper::getChecksum(array $array, bool $sort = false): ?string

ArrayHelper::getValueBasedOnCurrentDay(array $array): mixed

ClassHelper::getClassConstant(object $class, $value, ?string $prefix = null, bool $remove_prefix = true): ?string

ClassHelper::getClassInfoFromFile(string $file_path): array

ClassHelper::getClassNameFromFile(string $file_path): ?string

ClassHelper::getNamespaceFromFile(string $file_path): ?string

ClassHelper::getFullClassNameFromFile(string $file_path): ?string

ClassHelper::getMethodCodeFromClass(object $class, string $method_name, bool $

ClassHelper::callPrivateMethod(object $class, string $method_name, array ...$arguments): mixed