Collection of agnostic PHP Functions and helpers with zero dependencies to use as foundation in packages and other project

Overview

Collection of agnostic PHP Functions and helpers

Latest Version on Packagist Software License Build Status Quality Score Total Downloads

This package provides a lot of very usefull agnostic helpers to use as foundation in packages and other project.

NOTE: Some of these helpers was written by padosoft, another was founded on the opensource web and some of these is refactored and/or adjusted for our purpose or for improvements.

##Overview

All helpers function are splitted into these files:

  • Array
  • Constants (generic usefull constants)
  • DateTime
  • Helpers (misc functions)
  • IP
  • Reflection
  • Sanitize
  • String
  • Validation
  • Xml

##Requires

  • php: >=7.0.0|^8.0
  • nesbot/carbon (only for some datetime functions)

Installation

You can install the package via composer:

$ composer require padosoft/support

Usage

Create new php file, add composer autoload and start using functions.

<?php

require "vendor/autoload.php";

var_dump(str_random(16));

List of functions

Array

  • head
  • last
  • insert_at_top
  • array_has
  • array_get
  • array_set
  • CleanUpArrayOfInt
  • array_split_filter
  • in_array_column
  • objectToArray
  • arrayToObject
  • arrayToString
  • array_key_exists_safe
  • array_get_key_value_safe
  • isNullOrEmptyArray
  • isNotNullOrEmptyArray
  • isNullOrEmptyArrayKey
  • isNotNullOrEmptyArrayKey
  • array_remove_columns() : Remove given column from the subarrays of a two dimensional array.
  • array_remove_first_columns() : Remove first column from the subarrays of a two dimensional array.
  • array_remove_last_columns() : Remove last column from the subarrays of a two dimensional array.

DateTime

  • carbonFromIsoDateTime
  • carbonFromIsoDate
  • carbonFromItaDateTime
  • carbonFromItaDate
  • carbon
  • roman_year
  • partialsDateIso
  • dateIsoToIta
  • dateItaToIso
  • monthFromNumber
  • dateIsoToItaSpec
  • getNameDayFromDateIso
  • getTimeFromDateTimeIso
  • diff_in_year
  • age
  • ampm
  • ampm2Number
  • fuzzySpan
  • unixTimestamp2dos
  • dos2unixTimestamp
  • cal_days_in_month
  • cal_days_in_current_month
  • days_in_month
  • days_in_current_month

Helpers (misc functions)

  • rgb2hex
  • hex2rgb
  • format_money
  • format_euro
  • ordinal
  • value
  • with
  • setErrorReportingForProduction
  • isExecutedByCLI
  • bytes2HumanSize
  • convertPHPSizeToBytes
  • getMaximumFileUploadSize
  • encryptString
  • getFaviconUrl
  • getFaviconImgTag
  • isHttps
  • getQRcode
  • getQRcodeUrl
  • gravatarUrl
  • gravatar
  • isNumberOdd
  • isNumberEven
  • getTinyUrl
  • expandShortUrl
  • curl
  • curl_internal_server_behind_load_balancer
  • debug
  • isAjax
  • isMobile
  • getBrowser
  • getReferer
  • getCurrentURL
  • getCurrentUrlPageName
  • getCurrentUrlQuerystring
  • getCurrentUrlDirName
  • getCurrentUrlDirAbsName
  • isZlibOutputCompressionActive
  • isZlibLoaded
  • isClientAcceptGzipEncoding
  • compressHtmlPage
  • get_http_response_code
  • url_exists
  • startLayoutCapture
  • endLayoutCapture
  • get_var_dump_output
  • logToFile
  • isImageExtension
  • getImageExtensions
  • template
  • randomChance
  • getExceptionTraceAsString
  • windows_os
  • getConsoleColorTagForStatusCode() : Get the color tag for the given status code to be use in symfony/laravel console.
  • get_os_architecture() : Get the OS architecture 32 or 64 bit.
  • is_32bit() : Check if the OS architecture is 32bit.
  • is_64bit() : Check if the OS architecture is 64bit.
  • isRequestFromCloudFlare(): check if request (by given $_SERVER) is a cloudflare request.
  • isCloudFlareIp(): check if given ip is a valid cloudflare ip.
  • gzCompressFile(): GZIPs a file on disk (appending .gz to the name) without read all source file in memory.
  • getFileMimeType(): get the mime type string of a file using more strategies or return FALSE if it fails.
  • getFileMimeTypeByFileInfo(): get File MimeType string using the newer PHP finfo functions.
  • getFileMimeTypeByOSFileCommand(): get File MimeType string using the OS' file command. AFAIK that's only available on *NIX systems.
  • getImageMimeTypeByExif_imagetype(): get image MimeType string of image using exif_imagetype.

IP

  • getIPVisitor
  • anonimizeIp
  • anonimizeIpv4() : masquerade last digit of IPv4 address.
  • anonimizeIpv4Compatibility() : masquerade last digit of IPv4 compatibility address.
  • anonimizeIpv6() : masquerade last digit of IPv6 address.
  • anonimizeIpWithInet() : masquerade last digit of IP address with inet php function.
  • getHost
  • getClientIps
  • getClientIp
  • checkIp
  • checkIp4
  • checkIp6
  • isFromTrustedProxy
  • expandIPv6Notation(): * Replace '::' with appropriate number of ':0'
  • decbin32(): to ensure that the binary strings are padded with zeros out to 32 characters.
  • ipInRange(): Function to determine if an IP is located in a specific range as specified via several alternative formats.

Reflection

  • short_class_name
  • class_constants
  • class_uses_recursive
  • class_basename
  • getClassNameFromFile
  • getNamespaceFromFile
  • getPhpDefinitionsFromFile

Sanitize

  • strip_nl
  • jse : Escape javascript argument.
  • e : Escape html argument.
  • csse : Escape css argument.
  • attre : Escape html attribute argument.
  • she() : Escape shell argument.
  • normalizeUtf8String : Normalize the string. Removes all diacritics (marks like accents) from a given UTF8-encoded texts and returns ASCii-text.
  • normalizerUtf8Safe() : Normalize uft8 to various form with php normalizer function if exists, otherwise return original string.
  • sanitize_filename
  • sanitize_pathname
  • sanitize_arr_string_xss
  • sanitize_string_xss
  • sanitize_urlencode
  • sanitize_email
  • sanitize_numbers
  • sanitize_floats
  • sanitize_phone() : Sanitize the string by removing illegal characters from phone numbers.

String

  • generateRandomPassword
  • generateRandomString
  • preg_replace_sub
  • snake_case
  • str_random
  • ends_with
  • ends_with_insensitive
  • starts_with
  • starts_with_insensitive
  • str_contains
  • str_contains_insensitive
  • str_finish
  • str_finish_insensitive
  • str_is
  • str_limit
  • str_replace_array
  • studly_case
  • studly
  • camel_case
  • underscore2dash
  • dash2underscore
  • str_replace_multiple_space
  • str_replace_last
  • segment
  • firstSegment
  • lastSegment
  • isNullOrEmpty
  • isNotNullOrEmpty
  • numberToWord
  • secondsToText
  • minutesToText
  • hoursToText
  • str_html_compress
  • str_word_count_utf8
  • slugify() : Generate a URL friendly "slug" from a given string.
  • firstStringBetween(): Returns the first string there is between the strings from the parameter start and end.

Validation

  • isStringNumberStartsWithMoreThanOneZero
  • isIntegerPositive
  • isIntegerPositiveOrZero
  • isIntegerNegative() : Check if the value (int, float or string) is a integer and less than zero.
  • isIntegerNegativeOrZero() : Check if the value (int, float or string) is a integer and less than zero or equals to zero.
  • isIntegerZero() : Check if the value (int, float or string) is a integer and equals to zero.
  • isInteger
  • isIntegerFloatingPoint
  • isFloatingPoint
  • isDouble
  • isPercent
  • isIntBool() : Check if the value is a integer/string 0 or 1.
  • isDateIta
  • isDateIso
  • isDateTimeIso
  • isDateTimeIta
  • isTimeIso
  • isTimeIta
  • isDateZeroIso() : Check if string is 0000-00-00
  • isTimeZeroIso() : Check if string is 00:00:00
  • isDateTimeZeroIso() : Check if string is '0000-00-00 00:00:00'
  • isDateOrDateZeroIso() : Check if string is YYYY-mm-dd and valid date or 0000-00-00
  • isDateTimeOrDateTimeZeroIso() : Check if string is 'YYYY-mm-dd HH:ii:ss' and valid date or '0000-00-00 00:00:00'
  • isDateZeroIta() : Check if string is 00/00/0000
  • isTimeZeroIta() : Check if string is 00:00:00
  • isDateTimeZeroIta() : Check if string is '00/00/0000 00:00:00'
  • isDateOrDateZeroIta() : Check if string is dd/mm/YYYY and valid date or 00/00/0000
  • isDateTimeOrDateTimeZeroIta() : Check if string is 'dd/mm/YYYY HH:ii:ss' and valid date or '00/00/0000 00:00:00'
  • hasMinAge
  • hasMaxAge
  • hasAgeInRange
  • isInRange
  • isDay
  • isMonth
  • isJewishLeapYear
  • betweenDateIso
  • betweenDateIta
  • isMail
  • isIPv4
  • isIPv6
  • isIPv4Compatibility
  • isIP
  • isUrl
  • isHostname
  • urlW3c
  • isVATRegisteredInVies() : Validate a European VAT number using the EU commission VIES service to verify if VAT number is authorized to carry out intra-Community operations must use the service.
  • isITVat() : Check Italian Vat Number (Partita IVA).
  • isEuVatNumber() : Check if a valid EU vat given against specific EU country vat rules (at the moment only for italy) and optionally check the EU VIES service.
  • getCoutryCodeByVatNumberTest($val, $fallback): Try to extract EU country code in Vat number return $fallback if it fails.
  • isCf
  • isAlpha
  • isAlphaNumeric
  • isAlphaNumericDash
  • isAlphaNumericWhiteSpaces
  • isNumeric() : Determine if the provided value contains only numeric characters with or without(default) sign.
  • isNumericWithSign() : Determine if the provided value contains only numeric characters with sign.
  • isNumericWithoutSign() : Determine if the provided value contains only numeric characters without sign.
  • isBool
  • isBoolOrIntBool
  • isCrediCard
  • isValidHumanName
  • isIban
  • hasFileExtension
  • isphoneNumber
  • isJsonString
  • isUuid
  • isGeoCoordinate
  • isLatitude
  • isLongitude
  • isAscii
  • isUtf8

Xml

  • xmlUrl2array
  • xml2array
  • array2xml
  • array2SimpleXMLElement

Constants (generic usefull constants)

  • DS
  • NUMBERS_ITA_ARR
  • NUMBERS_EN_ARR
  • PERIOD_IN_SECONDS_ITA_ARR
  • PERIOD_SINGULAR_PLURAL_ITA_ARR
  • PERIOD_IN_SECONDS_EN_ARR
  • SECOND_IN_SECOND
  • MINUTE_IN_SECOND
  • HOUR_IN_SECOND
  • DAY_IN_SECOND
  • WEEK_IN_SECOND
  • MONTH_IN_SECOND
  • YEAR_IN_SECOND
  • DATE_TIME_FORMAT_ISO
  • DATE_TIME_FORMAT_ITA
  • DATE_FORMAT_ISO
  • DATE_FORMAT_ITA
  • TIME_FORMAT_ISO
  • TIME_FORMAT_ITA
  • SUNDAY
  • MONDAY
  • TUESDAY
  • WEDNESDAY
  • THURSDAY
  • FRIDAY
  • SATURDAY
  • DAYS_ITA_ARR
  • DAYS_ENG_ARR
  • GENNAIO
  • FEBBRAIO
  • MARZO
  • APRILE
  • MAGGIO
  • GIUGNO
  • LUGLIO
  • AGOSTO
  • SETTEMBRE
  • OTTOBRE
  • NOVEMBRE
  • DICEMBRE
  • MONTHS_ITA_ARR
  • MONTHS_ITA_ARR_1_BASED
  • MONTHS_SHORT_ITA_ARR
  • MONTHS_SHORT_ITA_ARR_1_BASED

Usage

You can call every functions directly. Example:

<?php

/*
 *  constans
 */
echo 'directory separator is: '.DS;

/*
 *  validation helpers
 */

//check iso date
if( !isDateIso("") )  echo 'invalid.';
if( !isDateIso("2016-08-18") )  echo 'invalid.';
if( !isDateIso("2016-18-08") )  echo 'invalid.';
if( !isDateIso("0000-00-00") )  echo 'invalid.';
if( !isDateIso("00-00-00") )  echo 'invalid.';
if( !isDateIso("16-08-18") )  echo 'invalid.';
if( !isDateIso("2016-02-38") )  echo 'invalid.';

//check italian Fiscal Code
if( !isCf("") )  throw new Exception();
if( !isCf("abcdefghijklmnoz") )  throw new Exception();
if( !isCf("xxxxxx12c34x567o") )  throw new Exception();

//check italian VAT (Partita iva)
if( !isPiva("") )  throw new Exception();
if( !isCf("00000000000") )  throw new Exception();
if( !isCf("02361141209") )  throw new Exception();
if( !isCf("00000000001") )  throw new Exception();

//check integer value
if( !isInteger(1561) )  throw new Exception();
if( !isInteger('sadasd') )  throw new Exception();

/*
 *  datetime helpers
 */

//sleep 2 minuti
sleep(2*MINUTE_IN_SECOND);
//sleep 2h
sleep(2*HOUR_IN_SECOND);
//sleep 2min and 30seconds
sleep(2*MINUTE_IN_SECOND+30);

//date format
echo date(DATE_FORMAT_ISO);//'Y-m-d' 
echo date(DATE_FORMAT_ITA);//'d-m-Y'
echo date(DATE_TIME_FORMAT_ISO);//'Y-m-d H:i:s'

//date conversion
echo dateIsoToIta('2016-08-18');//08/18/2016

//days and month
echo DAYS_ITA_ARR[0];//Lunedi
echo DAYS_ITA_ARR[date('w')];
echo MONTHS_ITA_ARR_1_BASED[12];//Dicembre
echo MONTHS_ITA_ARR_1_BASED[date('j')];

//misc
echo roman_year(50);//L
echo roman_year(10);//X
echo roman_year(2000);//MM
echo roman_year(2016);//MMXVI

/**
* String
 */
echo str_random(16);

NOTA: for full list of helpers functions, see the code in /src.

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email instead of using the issue tracker.

Credits

About Padosoft

Padosoft (https://www.padosoft.com) is a software house based in Florence, Italy. Specialized in E-commerce and web sites.

License

The MIT License (MIT). Please see License File for more information.

You might also like...
Laravel translation helpers
Laravel translation helpers

Laravel Translator Installation and setup Installation You can install the package via composer: composer require isaeken/laravel-translator Setup You

Laravel Helpers Automatic Loading System

About Laravel Helpers Automatic Load Laravel Helpers Automatic Loading System Doc: Copy the Helpers folder and paste it on app folder Then Go To app/P

Laravel magical helpers such as Controllers / Requests / Models

Laravel Magic provides Abstract Controller, Model, generic Request, Traits, Exceptions and various middlewares in order to generate very easily and quickly API resources from scratch.

PHP components - collection of cross-project PHP classes

PHP components Collection of cross-project PHP classes. Install: $ composer require ansas/php-component Ansas\Component\Convert\ConvertPrice Convert "

Projeto de um blog chamado Blog Codar feito durante o curso PHP: Do zero a maestria, ministrado pelo Matheus Baptisti

PJ- Blog Codar Este projeto é um blog fictício. Apesar de poder ser usado como um blog real, este projeto não tem conexão com banco de dados, então es

Projeto de uma rede social de Filmes feito durante o curso PHP: Do zero a maestria, ministrado pelo Matheus Baptisti
Projeto de uma rede social de Filmes feito durante o curso PHP: Do zero a maestria, ministrado pelo Matheus Baptisti

PJ - Moviestar Este projeto é uma rede social quase completa. O objeto de estudo aqui é a conexão de PHP + BD, PHP e a WEB, Regras de negócio complexa

Framework agnostic PHP package for marking navigation items active.

Ekko Framework agnostic PHP package for marking navigation items active. Features Framework agnostic. Can be modified for any custom application and U

🚀 Zero-downtime deployment out-of-the-box

🚀 Laravel Deployer Looking for the old Laravel Deployer? Click here. Laravel Deployer is no longer the package it used to be. Since that package was

Criação de um framework mvc do zero para estudo

PHP + PostgreSQL + PGAdmin4 + Composer A complete template for small projects Running the project To run this project you only need to run docker-comp

Releases(2.3.0)
  • 2.3.0(Jul 9, 2019)

  • 2.0.2(Apr 18, 2018)

  • 2.0.1(Apr 18, 2018)

    2.0.1 - 2018-04-18

    ADD:

    validation:
    • getCoutryCodeByVatNumberTest($val, $fallback): Try to extract EU country code in Vat number return $fallback if it fails.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Apr 18, 2018)

    2.0.0 - 2018-04-18

    BREAKING CHANGES:

    validation:
    • isPiva and IsVatNumber was removed in favour to new functions: isEuVatNumber, isVATRegisteredInVies, isITVat.
    • isVATRegisteredInVies() : Validate a European VAT number using the EU commission VIES service to verify if VAT number is authorized to carry out intra-Community operations must use the service.
    • isITVat() : Check Italian Vat Number (Partita IVA).
    • isEuVatNumber() : Check if a valid EU vat given against specific EU country vat rules (at the moment only for italy) and optionally check the EU VIES service.
    Source code(tar.gz)
    Source code(zip)
  • 1.17.4(Apr 18, 2018)

  • 1.17.3(Apr 18, 2018)

  • 1.17.2(Feb 15, 2018)

  • 1.17.1(Jan 23, 2018)

  • 1.17.0(Aug 26, 2017)

    1.17.0 - 2017-08-26

    ADDED:

    HELPERS:
    • gzCompressFile(): GZIPs a file on disk (appending .gz to the name) without read all source file in memory.
    Source code(tar.gz)
    Source code(zip)
  • 1.16.0(Aug 10, 2017)

    1.16.0 - 2017-08-09

    CHANGED:

    HELPERS:
    • bytes2HumanSize(): add param int $decimals [optional] default 0. Sets the number of decimal points.
    Source code(tar.gz)
    Source code(zip)
  • 1.15.0(Aug 9, 2017)

    1.15.0 - 2017-08-09

    ADDED:

    IP:
    • decbin32(): to ensure that the binary strings are padded with zeros out to 32 characters.
    • ipInRange(): Function to determine if an IP is located in a specific range as specified via several alternative formats.
    HELPERS:
    • isRequestFromCloudFlare(): check if request (by given $_SERVER) is a cloudflare request.
    • isCloudFlareIp(): check if given ip is a valid cloudflare ip.
    Source code(tar.gz)
    Source code(zip)
  • 1.14.1(Mar 28, 2017)

    1.14.1 - 2017-03-28

    FIX:

    XML:
    • FIX unterminated entity reference php in SimpleXMLElement->addChild. See http://stackoverflow.com/questions/17027043/unterminated-entity-reference-php.
    Source code(tar.gz)
    Source code(zip)
  • 1.14.0(Mar 24, 2017)

    1.13.2 - 2017-03-24

    ADD:

    HELPERS:
    • ADD $prepend option in format_money and format_euro. If $prepend true (default) prefix with $simbol, otherwise suffix with $simbol.
    Source code(tar.gz)
    Source code(zip)
  • 1.13.1(Mar 13, 2017)

  • 1.13.0(Dec 4, 2016)

    1.13.0 - 2016-12-04

    ADDED:

    VALIDATION:
    • isIntegerZero() : Check if the value (int, float or string) is a integer and equals to zero.
    • isIntegerNegative() : Check if the value (int, float or string) is a integer and less than zero.
    • isIntegerNegativeOrZero() : Check if the value (int, float or string) is a integer and less than zero or equals to zero.
    • isIntBool() : Check if the value is a integer/string 0 or 1.
    • isNumeric() : Determine if the provided value contains only numeric characters with or without(default) sign.
    • isNumericWithSign() : Determine if the provided value contains only numeric characters with sign.
    • isNumericWithoutSign() : Determine if the provided value contains only numeric characters without sign.
    • isDateZeroIta() : Check if string is 00/00/0000
    • isTimeZeroIta() : Check if string is 00:00:00
    • isDateTimeZeroIta() : Check if string is '00/00/0000 00:00:00'
    • isDateOrDateZeroIta() : Check if string is dd/mm/YYYY and valid date or 00/00/0000
    • isDateTimeOrDateTimeZeroIta() : Check if string is 'dd/mm/YYYY HH:ii:ss' and valid date or '00/00/0000 00:00:00'
    HELPERS:
    • get_os_architecture() : Get the OS architecture 32 or 64 bit.
    • is_32bit() : Check if the OS architecture is 32bit.
    • is_64bit() : Check if the OS architecture is 64bit.
    SANITIZE:
    • sanitize_phone() : Sanitize the string by removing illegal characters from phone numbers.

    CHANGED:

    HELPERS:
    • Update gravatar API.

    FIX:

    HELPERS:
    • template.
    Source code(tar.gz)
    Source code(zip)
  • 1.12.0(Nov 5, 2016)

    1.12.0 - 2016-11-05

    ADDED:

    SANITIZE:
    • normalizerUtf8Safe() : Normalize uft8 to various form with php normalizer function if exists, otherwise return original string.

    CHANGED:

    • small changes and refactor (scrutinizer advices).
    Source code(tar.gz)
    Source code(zip)
  • 1.11.0(Nov 5, 2016)

    1.11.0 - 2016-11-05

    ADDED:

    STRING:
    • slugify() : Generate a URL friendly "slug" from a given string.
    ARRAY:
    • array_remove_columns() : Remove given column from the subarrays of a two dimensional array.
    • array_remove_first_columns() : Remove first column from the subarrays of a two dimensional array.
    • array_remove_last_columns() : Remove last column from the subarrays of a two dimensional array.
    HELPERS:
    • getConsoleColorTagForStatusCode() : Get the color tag for the given status code to be use in symfony/laravel console.

    CHANGED:

    SANITIZE:
    • normalizeUtf8String() : now has more power and run with or without PHP Normalizer class.
    Source code(tar.gz)
    Source code(zip)
  • 1.10.0(Oct 29, 2016)

    1.10.0 - 2016-10-29

    ADDED:

    VALIDATION:
    • isIPv4Compatibility() : Check if a string is a valid IP v4 compatibility (ffff:ffff:ffff:ffff.192.168.0.15).
    IP:
    • anonimizeIpv4() : masquerade last digit of IPv4 address.
    • anonimizeIpv4Compatibility() : masquerade last digit of IPv4 compatibility address.
    • anonimizeIpv6() : masquerade last digit of IPv6 address.
    • anonimizeIpWithInet() : masquerade last digit of IP address with inet php function.
    • expandIPv6Notation(): * Replace '::' with appropriate number of ':0'

    IMPROVE

    IP:
    • anonimizeIp(): now support ipv6 and ipv4 compatibility.
    Source code(tar.gz)
    Source code(zip)
  • 1.9.1(Sep 18, 2016)

  • 1.9.0(Sep 17, 2016)

  • 1.8.0(Sep 17, 2016)

  • 1.7.0(Sep 14, 2016)

    1.7.0 - 2016-09-14

    CHANGES:

    STRING:

    • str_replace_multiple_space now accept new optional argument to replace   VALIDATION:
    • isTimeIso: check if string format is ok but number is out of range of valid date (i.e.: 24:88:99 is now return false).

    ADDED:

    VALIDATION:

    • isDateZeroIso
    • isTimeZeroIso
    • isDateTimeZeroIso
    • isDateOrDateZeroIso
    • isDateTimeOrDateTimeZeroIso
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Sep 9, 2016)

    1.6.0 - 2016-09-09

    ADDED functions:

    helper:

    • template
    • randomChance
    • getExceptionTraceAsString

    sanitize:

    • csse
    • attre

    validation:

    • isPercent

    reflection:

    • getClassNameFromFile
    • getNamespaceFromFile
    • getPhpDefinitionsFromFile
    Source code(tar.gz)
    Source code(zip)
  • 1.5.0(Sep 9, 2016)

    1.5.0 - 2016-09-09

    FIXED:

    validation:

    • dateItaToIso

    ADDED functions:

    validation:

    • isInRange
    • isDay
    • isMonth
    • isJewishLeapYear
    • betweenDateIso
    • betweenDateIta

    add more tests.

    Source code(tar.gz)
    Source code(zip)
  • 1.4.4(Sep 8, 2016)

  • 1.4.3(Sep 7, 2016)

  • 1.4.2(Sep 2, 2016)

    1.4.2 - 2016-09-02

    ADD functions:

    datetime:

    • ampm
    • ampm2Number
    • fuzzySpan
    • unixTimestamp2dos
    • dos2unixTimestamp

    helpers:

    • isImageExtension
    • getImageExtensions
    Source code(tar.gz)
    Source code(zip)
  • 1.4.1(Aug 30, 2016)

    1.4.1 - 2016-08-30

    ADD these new functions:

    • starts_with_insensitive
    • str_contains_insensitive
    • str_finish_insensitive
    • ends_with_insensitive
    • getReferer
    • getCurrentUrlPageName
    • getCurrentUrlQuerystring
    • getCurrentUrlDirName
    • getCurrentUrlDirAbsName
    • str_html_compress
    • isZlibOutputCompressionActive
    • isZlibLoaded
    • isClientAcceptGzipEncoding
    • compressHtmlPage
    • get_http_response_code
    • url_exists
    • isNullOrEmptyArrayKey
    • isNotNullOrEmptyArrayKey
    • isNotNullOrEmptyArray
    • startLayoutCapture
    • endLayoutCapture
    • get_var_dump_output
    • logToFile
    • curl_internal_server_behind_load_balancer

    CHANGES

    • isHttps now support HTTP_X_FORWARDED_PROTO
    • isNullOrEmpty now have a withTrim option
    • isNotNullOrEmpty now have a withTrim option
    • curl(): add more power to curl function!
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Aug 27, 2016)

    1.4.0 - 2016-08-27

    • ADD new functions: constants, objectToArray, getFaviconUrl, str_limit now have an option to preserve words, number to word and time to word functions, isMail now ha an option to check MX record is valid, .
    • ADD many unit test.
    • CHANGE small refactoring.
    • CHANGE readme: add a full list of functions and constants.
    • FIX rgb2hex.
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(Aug 25, 2016)

Owner
padosoft
Software House
padosoft
A collection of helper functions that I use across my projects.

A collection of helper functions that I use across my projects. This package includes some of the helper functions that I tend to use in all of my pro

Ryan Chandler 33 Oct 18, 2022
A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDowell

PHPAlgorithms A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDow

Doğan Can Uçar 921 Dec 18, 2022
Base library for repeated layout fields, content builders and other collection components

laravel-flexible-content This package's only purpose is to build custom repeated layout components, such as Laravel Nova's Flexible Content field or y

Whitecube 5 May 31, 2022
Laravel blade directives and php helpers for serverside rendered content, based on browser window size WITHOUT css. Requires Livewire and AlpineJS.

Laravel Livewire Window Size and Breakpoints Laravel blade directives and php helpers for server side rendered content, based on browser window size W

Tina Hammar 15 Oct 6, 2022
Laravel blade directives and php helpers for serverside rendered content, based on browser window size WITHOUT css

Laravel Window Size and Breakpoints Laravel blade directives and php helpers for server side rendered content, based on browser window size WITHOUT cs

Tina Hammar 7 Nov 23, 2022
Because I can never remember exactly how to autoload my helpers.php file.

Laravel Helpers File (helpers.php) I add a app/helpers.php file to every project for any custom helpers I might want to create. Everytime I go to add

Caleb Porzio 59 Mar 31, 2022
Generate and autoload custom Helpers, Builder Scope, Service class, Trait

laravel-make-extender Generate and autoload custom helpers, It can generate multilevel helpers in the context of the directory. Generate Service class

Limewell 30 Dec 24, 2022
SEO Helper is a package that provides tools and helpers for SEO (Search Engine Optimization).

SEO Helper By ARCANEDEV© SEO Helper is a package that provides tools and helpers for SEO (Search Engine Optimization). Feel free to check out the rele

ARCANEDEV 301 Nov 25, 2022
Scripts, helpers and configs to make hacking on Synack less painful

SynackMoPleasure Scripts, helpers and configs to make hacking on Synack less painful TuPOC HTTP OOB PHP Logger This PHP script was created to test/exp

Osirys 3 Sep 20, 2022
Automatically load your helpers in your laravel application.

Laravel AutoHelpers Automatically load your helpers in your laravel application. Installation You can install the package via composer: composer requi

Florian Wartner 6 Jul 26, 2021