PHP Classes

Examples of Useful PHP Functions from the Package PHP Utility Functions: General-purpose utility functions

Recommend this page to a friend!
  Info   View files Documentation   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-04-26 (19 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: 1 This week: 1All time: 11,317 This week: 89Up
Version License PHP version Categories
php-util 1.0.0MIT/X Consortium ...5PHP 5, Data types, Global
Description 

Author

This package provides general-purpose utility functions.

It provides a set of functions to manipulate strings and arrays.

Currently, it can:

- Encode text as HTML

- Validate E-Mail address

- Return the current date and time in the ISO format

- Return a UUID v4 string

- Return array elements given the element path in the dot notation format

- Encode an array in JSON format

- Decode a JSON string

- Encode a string or array of values in UTF-8 encoding

- Decode a string or array of elements that use ISO-8859-1 encoding

- Include a PHP script and return the values defined in the script

Picture of Chun-Sheng, Li
  Performance   Level  
Name: Chun-Sheng, Li <contact>
Classes: 29 packages by
Country: Taiwan Taiwan
Innovation award
Innovation award
Nominee: 14x

Winner: 1x

Instructions

Congratulations on your package.

We suggest you include simplified instructions on using your package to increase the number of interested users.

To do that, please click the Edit button on your package page and enter the instructions text in the Instructions field.

You can use the Markdown format to enter your instructions.

Then click the Update the class button to save the instructions. You can see the instructions on your package page.

Documentation

util

PHP functions

Installation

composer require odan/util

Functions

  • html - Convert all applicable characters to HTML entities.
  • is_email - Validate a E-Mail address
  • now - ISO date time (Y-m-d H:i:s)
  • uuid - Returns a `UUID` v4 created from a cryptographically secure random value
  • array_value - Return Array element value, with dot notation.
  • encode_utf8 - Encodes an ISO-8859-1 string or array to UTF-8.
  • encode_iso - Returns a ISO-8859-1 encoded string or array
  • read - Read a php file

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Files folder imagetests (1 file)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file build.xml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file util.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
  Plain text file UtilTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:1
This week:1
All time:11,317
This week:89Up