Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Php Vs Phyton
1. Reported by:
Cruz, Argel
Guison, Francis
Tablan, Miguel
Tan, Andrew
Ward, Paul Maverick
2. Both Python and PHP are what have become
known as interpreted scripting languages for
web applications.
Each has achieved substantial popularity due
primarily to their ability to facilitate rapid
prototyping.
3. Both Phyton and PHP are open source.
Can run almost all platforms without
recompilation | Extremely portable.
Recommended and supported by large
developer communities.
4. Phyton 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'
Ex: construct
result = { Ex:
‘a': lambda x: x * 5, switch ($value) {
'b': lambda x: x + 7, case 'a': $result = $x * 5; break;
'c': lambda x: x - 2 case 'b': $result = $x + 7; break;
} [value](x) case 'c': $result = $x - 2; break; }
• Functions are declared with the quot;defquot; • Functions often have prefixes to denote
keyword. their source
5. PHP Phyton
• Specialized for Web development • A general purpose programming
programming language. language
• The built-in library has a wide variety of • Very clear and concise, syntax of codes
naming conventions
• Not Object oriented • Object-oriented file handling
6. The PHP is more popular than Phyton in terms
of scripting languages from the web.
PHP has more resources
PHP can implement in HTML file. More easier to
understand.
Unlike PHP, the developer first must understand
CGI, FASTCGI, MOD_PYTHON, > FLUP, WSGI,
PASTE, etc. to use Phyton.