PHP code example of straylightagency / helpers
1. Go to this page and download the library: Download straylightagency/helpers 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/ */
straylightagency / helpers example snippets
price_format(num: mixed, decimals: int = 2, decimal_separator: string|null = ".", thousands_separator: string|null = "" ): float
clamp(value: int|float, min: int|float, max: int|float): float|int
svg_get_contents(file_path: string, class_list: string|null = null): string
iso_to_emoji(code: string): string
array_map_keys(callback: callable|null, array: array): array
preg_match_callback_array(patterns: array, subject: string): array
array_recursive_diff(a: array, b: array):array
array_clean_first(array: array): array
array_clean_last(array: array): array
array_safe(array: mixed): array
split_content(content: string): array
strip_p(content: string): string
text_excerpt(content: string, limit: int = 35, end: string = '...'): string
google_maps_url(address: array, itinerary: bool = false): string
vimeo_id(vimeo_url: string): int|null
youtube_id(youtube_url: string): string|null
json_stripslashes_decode(json: string, associative: bool|null = null, depth: int = 512, flags: int = 0): mixed