PHP

The language of the web.

Published at 2018-08-15, Updated at 2013-02-26.
Getting Started With PHP

Getting Started With PHP

Posted in PHP at 2011-10-25 by #care-crew

PHP stands for "Hypertext Preprocessor" and it's open source, but it isn't as bad as it sounds so you may just forget what I just said and keep reading. PHP is widely used on websites to extend their functionality, like for example add user registration, write a...

PHP Development Environment

PHP Development Environment

Posted in PHP at 2011-10-25 by #care-crew

A proper Development Environment helps you coding, especially for starters. Notepad++ or Vim are used by a lot of php programmers, because both are free and very powerful. If you are a Windows User, you should try out Notepad++. Grab your free copy at notepa...

syntax, variables, comments and functions

syntax, variables, comments and functions

Posted in PHP at 2011-10-25 by #care-crew

Get started using php, learn the syntax, create variables and program your own functions. Every script (it is called, script, because it is interpreted) can contain php and html code. It is possible to mix both, however it is best to keep em separated. The ph...

Debugging PHP with xdebug and notepad++

Debugging PHP with xdebug and notepad++

Posted in PHP at 2011-10-25 by #care-crew

Debugging PHP helps fixing your bugs faster and removes debug code from your script forever. Stop using "echo" and "var_dump", instead use xdebug and notepad++ to debug your script, like one debugs a c++ program. the setup You need notepad++ with DBGD Plugin...

Namespace

Namespace

Posted in PHP at 2011-10-25 by #care-crew

Namespaces are part of PHP since version "5.3". They allow you to structure your code similiar to c(#|++) and java. It works great together with autoloading, however there are some important issue you should know. namespaces and useage It is important that n...

Class

Class

Posted in PHP at 2011-10-25 by #care-crew

Classes represent Objects with attributes and actions. Object Oriented Programming (OOP)is possible since the introduction of PHP5. The latest version of PHP gives us Late-Static-Binding and a bunch of magic methods. What are classes and why are they so aweso...

user friendly urls

user friendly urls

Posted in PHP at 2011-10-25 by #care-crew

User friendly urls are often used for search engine optimization, but more important, they improve the browsing experience of the users. Rewritten urls can be done with mod_rewrite or similar methods (like redirect settings of web-servers). requirements A we...

Secure User Input with Markdown

Secure User Input with Markdown

Posted in PHP at 2011-10-25 by #care-crew

You often have to validate user input, for examples in comments. Allowing html markup is insecure, bbcode is old. Markdown is the solution. Markdown alone does not secure the user input, but together with htmlspecialchars it will provide a better security. Ne...

Exception

Exception

Posted in PHP at 2011-10-25 by #care-crew

PHP Exceptions allow you finer control over your applications. They are very similar to java or c++ exceptions. Exceptions can be thrown and caught. Here is a small example: <php function doSomething(){ ...//some code if($something == false) throw n...

Speed up your Website

Speed up your Website

Posted in PHP at 2011-10-25 by #care-crew

A fast loading and responsive website is important for success, because nobody likes to wait and visitors will close your website, if it doesn't load fast enough. We present you five tipps. Compress Javascript Compress, minimize and combine your javascript f...

Best Practices Coding Guidelines

Best Practices Coding Guidelines

Posted in PHP at 2011-10-25 by #care-crew

PHP Coding Guidelines show the Best Practices in PHP Code Style. Using the best practices improves the code quality and maintenance is easier. A summary of the most important php code guidelines. This are our standards. Feel free to use em and tell us how to ...

MVC Model View Controller

MVC Model View Controller

Posted in PHP at 2011-11-05 by #care-crew

MVC is short for Model View Controller. It is a design pattern from GUI development which is often used in web development. A modern website written in php5 will benefit from the MVC pattern, because it allows easier maintenance and better results. In this ar...

Strings Heredoc Nowdoc

Strings Heredoc Nowdoc

Posted in PHP at 2011-11-06 by #care-crew

PHP Heredoc enables to mix php and html in a good to read way. It enables the output of strings without escaping each of them. Nowdoc was introduced with php 5.3 and outputs textual content without any parsing. ###Heredoc <php echo <<<RANDOM_STR...

autoloader

autoloader

Posted in PHP at 2011-11-14 by #care-crew

PHP Autoloading allows you to speed up development, because you no longer include every file by hand. PHP offers different methods to enables autoloading, learn about the differences and keep the hints in mind. ###function __autoload If you define a functi...