PHP

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

How to retrieve the human name of a color by its hex code in PHP
Learn how to retrieve a readable name of an hexadecimal color code with PHP.
How to write a text file with ANSI encoding (Western Windows-1252) in PHP
Learn how to write a plain text file in PHP with the Western Windows 1252 encoding.
How to round up/down to nearest 10 or 5 minutes of DateTime in PHP
Learn how to round down/up the minutes of a DateTime object in PHP by some interval.
How to convert a nested PHP array to a CSS, SASS, LESS rule (string)
Learn how to convert an array to a CSS, LESS or SASS rule in a string format.
How to group an array of associative arrays by key in PHP
Learn how to group an array of associative arrays by some key with PHP.
How to Get Rid of the PHP Warning: json_encode() expects parameter 2 to be long, string given
Learn why this warning appears in your PHP code and how to solve it.
Converting bytes to human readable values (KB, MB, GB, TB, PB, EB, ZB, YB) with PHP
Learn how to convert a value of bytes into an easily readable bytes format with PHP.
How to change the value of a variable outside of the scope within a closure function in PHP
Learn how to update the value of a variable that is outside from the scope of a closure function in PHP.
How to deserialize a DC2Type array datatype stored with Doctrine in your database
Learn what DC2Type strings stored with Doctrine in your Database mean and how to unserialize them.
How to handle safely PHP error: __toString() must not throw an exception
Learn how to solve the "__toString() must not throw an exception" error in PHP.