apples and oranges-- introductory comparison between php and python
DESCRIPTION
A brief comparison between the two most happening languages of the past decade.TRANSCRIPT
![Page 1: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/1.jpg)
Murtaza A
Introductory Comparison- PHPandPython
13 Slides
ApplesandOranges
![Page 2: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/2.jpg)
2
A little bit of history
A little bit of comparison
To py or not to py
Summary
1
2
3
when I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.
![Page 3: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/3.jpg)
3
Personal Homepage
A little bit of history
Rasmus Lerdorf (1995) took Perl by the throat PHP 1&2
Andi Gutmans & Zeev Suraski (1997) took PHP by the throat PHP 3
Zend Core Engine (2000) PHP 4
Object-Oriented PHP (2004) PHP 5
![Page 4: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/4.jpg)
4
PHP Hypertext Processor
A little bit of history
PHP 5.3 supports scripting in multiple languages and namespaces
PHP 5.3 is fully x64 aware
PHP 6 is in parallel development
PHP is installed on more than 30,000,000 websites and 2,000,000 web servers
![Page 5: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/5.jpg)
5
Python
A little bit of history
Guido van Rossum (1980) took ABC by the throat Python 0.1
van Rossum (1991) opens up Python 0.9
Python 1.0 (1994) followed by GNU-compatible Python 1.6 (1998)
With Garbage Collector and Unicode Support (2000) Python 2.0
![Page 6: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/6.jpg)
6
Just Py
A little bit of history
Python Software Foundation (2001) owns rights to Python code v2.1a onwards
Python 3000 (2008) “reduce feature duplication by removing old ways of doing things”
Multi-paradigm (OO, Struct, Func)
Backwards Incompatibility
![Page 7: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/7.jpg)
7
What PHP can do
to py or not to py
Server Side Scripting
Command Line Scripting
Write Desktop Apps
Interface with RDBMS
Run on any OS or platform, free of charge
![Page 8: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/8.jpg)
8
Why PHP
to py or not to py
RAD with CakePhp, ZendFramework
Uses widely familiar C++ Syntax
The most popular web scripting language
Yahoo, Facebook, Joomla, Digg, Wikipedia, YouTube, WordPress, Tagged
FOSS
![Page 9: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/9.jpg)
9
What Py can do
to py or not to py
Server Side Scripting / CLS
Write Desktop Apps
Develop non-critical areas of Linux & Symbian
Write 2D/3D Apps (incl. Video Games)
Run on any OS or platform, free of charge
![Page 10: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/10.jpg)
10
Why Py
to py or not to py
RAD/Glue with Django, Zope
Combines Java, Haskell, Modula-3, Perl, C++
IronPython, Jython, CPython, Pyjamas
Yahoo, Google, Nokia, CERN, NASA, YouTube, BitTorrent
FOSS
![Page 11: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/11.jpg)
11
Apples
A little bit of comparision
Oranges
![Page 12: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/12.jpg)
12
Python PHP
• Python uses whitespace indentation • Codes with lots curly braces [{ }] and dollar signs [ $]
• Case Sensitive • PHP variable names are case sensitive, but the names of functions are case insensitive.
• Doesn’t support a native switch statement
•The 'switch' statement and 'do ... while' construct
•Clear, concise syntax •C++ style syntax
• Functions are declared with the "def" keyword.
• Functions often have prefixes to denote their source
•Duck Typing •Late Static Binding
A little bit of comparision
![Page 13: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/13.jpg)
13
Python PHP
•Strongly typed •Weakly typed
•General purpose language • Predominantly Web scripting langauge
•Java-style self-documenting (pyDoc) •No such documenting features (may be in PHP 6)
•Multiple inheritance •Supports Java-style ‘Trails’
• C++ style Operator overloading • Can be ‘emulated’ using compiler extensions
•Multi-threading •Threading may be introduced in PHP 6
A little bit of comparision
![Page 14: Apples and Oranges-- Introductory Comparison between PHP and Python](https://reader034.vdocuments.site/reader034/viewer/2022050801/556131f7d8b42a263b8b45c7/html5/thumbnails/14.jpg)
Thankyou
Misfortune shows those who are not really friends. -Aristotle