background preloader

PHP

Facebook Twitter

Using the Python Interpreter — Python 2.7.8 documentation. 2.1. Invoking the Interpreter The Python interpreter is usually installed as /usr/local/bin/python on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command to the shell. Since the choice of the directory where the interpreter lives is an installation option, other places are possible; check with your local Python guru or system administrator. (E.g., /usr/local/python is a popular alternative location.) On Windows machines, the Python installation is usually placed in C:\Python27, though you can change this when you’re running the installer. To add this directory to your path, you can type the following command into the command prompt in a DOS box: set path=%path%;C:\python27 Typing an end-of-file character (Control-D on Unix, Control-Z on Windows) at the primary prompt causes the interpreter to exit with a zero exit status.

The interpreter’s line-editing features usually aren’t very sophisticated.

PHP Interpreters

PEAR - PHP Extension and Application Repository. PHP Tutorials - What is a Variable? A variable is just a storage area. You put things into your storage areas (variables) so that you can use and manipulate them in your programmes. Things you'll want to store are numbers and text. If you're ok with the idea of variables, then you can move on. If not, think of them like this. Suppose you want to catalogue your clothing collection. You count how many coats you have, and then give these to the man. Mr_coats mrs_shoes But it's entirely up to you what names you give your people (variables). Man_coats woman_shoes Or HimCoats HerShoes But because your memory is bad, it's best to give them names that help you remember what it is they are holding for you. OK, so your people (variables) now have name. Mr_coats = 10 So, the variable name comes first, then an equals sign. However, you're learning PHP, so there's something missing.

$mr_coats = 10 If you miss the dollar sign out, then your people will refuse to work! $mr_coats = 10; So the man is holding ten coats. $mrs_shoes = 25; Php-tutorial.pdf. Getting Started. PHP Sandbox, test PHP online, PHP tester. Documentation. 24 Cool PHP Libraries You Should Know About. Martin Angelov It is an exciting time to be a PHP developer. There are lots of useful libraries released every day, and with the help of Composer and Github, they are easy to discover and use. Here are 24 of the coolest that I’ve come across. Your favorite is not on the list? Share it in the comment section! 1. Dispatch is a minimal PHP framework. Include 'dispatch.php'; get('/greet', function () { render('greet-form'); }); post('/greet', function () { $name = from($_POST, 'name'); render('greet-show', array('name' => $name)); }); dispatch(); You can match specific types of HTTP requests and paths, render views and more. 2.

Klein is another light weight routing library for PHP 5.3+. Respond('/[:name]', function ($request) { echo 'Hello ' . You can also subscribe to specific HTTP methods and use regexes as paths: This is great for small projects, but you have to be disciplined when using a library like this for larger apps, as your code can become unmaintainable very fast. 3. Require '.. 4. PHP 5 Tutorial.