Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PHP
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Comments== // single line /* multiple line */ ==Functions== * function arguments: ** bool ** int ** float ** string ** array ** callable ** self ** iterable ** object ** class ** interface ==OO== * namespace? * interface? * self? * method * $this? * use? * annotations? * visibility: ** private: only in this class ** protected: only in derived classes ** public: everywhere * ctor function __construct() { parent::__construct(); // has to be called explicitly ... } There can only be one ctor which can have function parameters. * dtor function __destruct() { parent::__destruct(); // has to be called explicitly } * inheritance class B extends A { public function __construct() { parent::__construct(); * trait: a trait is similar to a class, but only intended to group functionality in a fine-grained and consistent way. It is not possible to instantiate a Trait on its own. It is an addition to traditional inheritance and enables horizontal composition of behavior; that is, the application of class members without requiring inheritance. ==PHP Standard Recommendation (PSR)== * [https://www.php-fig.org/psr/psr-1/ PSR-1] ** each sub-word should be capitalised in both instances, with classes having an initial upper-case letter (StudlyCaps) and methods an initial lower-case letter (camelCase) ** Class constants MUST be declared in all upper case with underscore separators * [ PSR-3] is the logger interface * [https://www.php-fig.org/psr/psr-2/ PSR-2] * [https://www.php-fig.org/psr/psr-4/ PSR-4] ==PDO== PHP Data Objects ('''PDO''') is a Database Access Abstraction Layer. ==Exceptions== The base '''Exception''' class provided in PHP 5 can be extended. ==PHPUnit== PHPUnit provides a simple framework for creating a test suite to automate testing of functions and classes. ===Installation=== ==XDebug== * documentation see [https://xdebug.org/docs/ here] * activate in php.ini an restart web server * XDebug will not automatically start a debugging session, but it needs to be activated in one of three ways ** before starting a PHP script from command line by set the environment variable XDEBUG_CONFIG ** calling a PHP script from a web browser by using setting the GET parameter XDEBUG_SESSION_START, by setting it as a POST parameter of through a cookie named XDEBUG_SESSION ** last can be set by using a browser extension for XDebug ==Resources== * http://php.net/manual/en/ * [http://www.phpdoc.de/ PHPDoc] * [https://docs.phpdoc.org PHPDocumentor]
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width