User Tools

Site Tools


programmieren:php:wichtigefunktionen

This is an old revision of the document!


Wichtige Funktionen

Array Functions

Some stuff that I think is important in base PHP is the list of array functions. Theres actually so much you can do with arrays and those functions in base PHP where you don't have access to collections etc. And knowing how to use them is very important.

$array = array_merge_recursive(...$array)

My beloved. This is used to get arrays nested within other arrays to all be on the same level.

Debugging functions

debug($anyVariableYouMayWantToDebug)

CakePHP only. PHP Equivalent is print_r(). Is useful to debug certain things and to set a breakpoint right at that place.

var_dump($anyVariableYouMayWantToDump)

Native PHP. Basically echoes any variable with all its details to whatever interface you're working on. Great to see what actual data you get from something like an API.

programmieren/php/wichtigefunktionen.1786112749.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki