berlioz / utils
Additional functions for PHP
Installs: 2 834
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- ext-iconv: *
- ext-intl: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ^7.5
Suggests
- ext-gd: *
This package is auto-updated.
Last update: 2020-03-11 00:34:17 UTC
README
⚠️ Package abandoned, look at replacement package: BerliozFramework/Helpers ⚠️
Berlioz Utils
Additional functions for PHP to help you in development.
Dates
b_time_to_sec(...)
: return the number of seconds since midnight with hour param in format (HⓂ️i)b_sec_to_time(...)
: format time with timestamp in entryb_date_format(...)
: format date/time object or timestamp to the given patternb_age(...)
: calculation of age with birthdayb_db_date(...)
: convert date in entry to the database format (computer format)
Forms
b_form_protect(...)
: protect data passed into form valuesb_form_control(...)
: control form input data (from $_GET or $_POST)b_form_control_get(...)
: control form input data from $_GETb_form_control_post(...)
: control form input data from $_POST
Security
b_is_secured_page(...)
: is secured page ?b_get_secured_page(...)
: get secured page of given url
Strings
b_mb_detect_encoding(...)
: mb_detect_encoding() alternative (using iconv)b_detect_utf_encoding(...)
: detect UTF encoding of string or filesb_remove_bom
(...): remove the BOM of UTF string or filesb_truncate(...)
: truncate stringb_remove_entities(...)
: remove entities from stringb_strtouri(...)
: treat string for urlb_random_string(...)
: generate an hazard stringb_email_account(...)
: extract account part of emailb_email_domain(...)
: extract domain of emailb_nl2p(...)
: surrounds paragraphs with "P" HTML tag and inserts HTML line breaks before all newlines
Objects
b_property_get(...)
: get property value to an object when we don't know getter formatb_property_set(...)
: set property value to an object when we don't know setter format
Arrays
b_array_traverse(...)
: traverse array with keysb_array_merge_recursive(...)
: merge two or more arrays recursively
Images
b_gradient_color(...)
: calculate a gradient destination colorb_img_size(...)
: calculate sizes with new given width and heightb_img_resize(...)
: resize imageb_img_support(...)
: resize support of image