Difference between revisions of "PHP"
Jump to navigation
Jump to search
(The rest of this is very old, but I wanted to add a couple decent links) |
|||
Line 1: | Line 1: | ||
+ | == Who wrote PHP?== | ||
+ | https://www.php.net/credits.php | ||
− | = Resource Sites = | + | == How do you upgrade? == |
+ | See the [https://www.php.net/manual/en/ migrating appendices in the manual] | ||
+ | |||
+ | == Resource Sites == | ||
# Aidan Lister from Autstralia has a nice site online (source provided to make your own similar site) which lists many classes and PHP functions for doing routine things that you will inevitabably face in programming. Things like making a directory structure recursively, or checking the size of a directory and it's contents. http://aidanlister.com/ | # Aidan Lister from Autstralia has a nice site online (source provided to make your own similar site) which lists many classes and PHP functions for doing routine things that you will inevitabably face in programming. Things like making a directory structure recursively, or checking the size of a directory and it's contents. http://aidanlister.com/ | ||
# Jeroen (John) Post created http://onlinephpfunctions.com/ which lets you play with PHP code in the browser, and specifically test that code with multiple versions of PHP. | # Jeroen (John) Post created http://onlinephpfunctions.com/ which lets you play with PHP code in the browser, and specifically test that code with multiple versions of PHP. |
Revision as of 15:03, 20 February 2024
Contents
Who wrote PHP?[edit | edit source]
https://www.php.net/credits.php
How do you upgrade?[edit | edit source]
See the migrating appendices in the manual
Resource Sites[edit | edit source]
- Aidan Lister from Autstralia has a nice site online (source provided to make your own similar site) which lists many classes and PHP functions for doing routine things that you will inevitabably face in programming. Things like making a directory structure recursively, or checking the size of a directory and it's contents. http://aidanlister.com/
- Jeroen (John) Post created http://onlinephpfunctions.com/ which lets you play with PHP code in the browser, and specifically test that code with multiple versions of PHP.
Language Features[edit | edit source]
Magic Methods[edit | edit source]
- SetnGeti - an implementation of Magic Methods for getting and setting based on traits and DocBlock comments.
- Don't do it the wrong way
JSON[edit | edit source]
With json_decode()
, you either get an object, or using the optional second
parameter, you can force the return value to an array. In the former case, you access the content using object notation. In the latter case, you use array notation.
ie.
$data = json_decode($data);
$version = $data->query->general->generator;
// or
$data = json_decode($data, true);
$version = $data['query']['general']['generator'];
ToDo[edit | edit source]
- implement the codesniffer locally https://github.com/wikimedia/mediawiki-tools-codesniffer