PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.

Slides:



Advertisements
Similar presentations
Python Whats in a name? Snake logos and mascot notwithstanding, its named after Monty Pythons Flying Circus Humor-impaired can safely.
Advertisements

A Crash Course Python. Python? Isn’t that a snake? Yes, but it is also a...
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Python: a modern hybrid A language for scripting and prototyping Balance between extensibility and powerful built-in data structures genealogy: –Setl (NYU,
Learning Web development. 3(+1) Tier architecture PHP script Remote services Web Server (Apache, IIS) Browser (IE, FireFox, Opera) Desktop (PC or MAC)
Introduction to Java Programming, 4E
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.
C# Programming: From Problem Analysis to Program Design1 Advanced Object-Oriented Programming Features C# Programming: From Problem Analysis to Program.
Scripting Languages CS351 – Programming Paradigms.
Chapter 2 - Java Programming Fundamentals1 Chapter 2 Java Programming Fundamentals.
1 Outline 7.1 Introduction 7.2 Implementing a Time Abstract Data Type with a Class 7.3 Special Attributes 7.4Controlling Access to Attributes 7.4.1Get.
Python Introduction.
The PHP Story. PHP Story PHP is a programming language. Incorporate(join) sophisticated business logic. Widely used general purpose scripting language.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
Programming Languages and Paradigms Object-Oriented Programming.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
CIS 068 JAVA vs. C++ Main Differences. CIS 068 JAVA vs C++ Java is (an interpreted) write once, run anywhere language. –The biggest potential stumbling.
Chapter 1: Creating Java Programs
Sadegh Aliakbary Sharif University of Technology Fall 2010.
1 Python CIS*2450 Advanced Programming Concepts Material for this lecture was developed by Dr. D. Calvert.
C# Programming Fundamentals of Object-Oriented Programming Fundamentals of Object-Oriented Programming Introducing Microsoft.NET Introducing Microsoft.NET.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Ruby! Ronald L. Ramos. What is Ruby? Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms,
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Introduction to Java Programming with Forte Y. Daniel Liang.
Introduction to java Prepared By:-Pragnesh Patel Lect. In Computer Dept. NSIT,Jetalpur 1.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
CIT 590 Intro to Programming First lecture on Java.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
Getting Started with Python: Constructs and Pitfalls Sean Deitz Advanced Programming Seminar September 13, 2013.
C463 / B551 Artificial Intelligence Dana Vrajitoru Python.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
CS105 Computer Programming PYTHON (based on CS 11 Python track: lecture 1, CALTECH)
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
Introduction Mehdi Einali Advanced Programming in Java 1.
Java FilesOops - Mistake Java lingoSyntax
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Perl Ed Finegan. Overview of Pearl Perl is a high-level programming language written by Larry Wall. It derives from the C programming language and to.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
Introduction to Java Programming, 4E Y. Daniel Liang.
Java and C# - Some Commonalities Compile into machine-independent, language- independent code which runs in a managed execution environment Garbage Collection.
PHP Programming Language. PHP is a server-side scripting language designed for web development but also used as a general- purpose programming language.
PHP using MySQL Database for Web Development (part II)
CIS 068 JAVA vs. C++ Main Differences CIS 068.
Ruby: An Introduction Created by Yukihiro Matsumoto in 1993 (named after his birthstone) Pure OO language (even the number 1 is an instance of a class)
Introduction Python is an interpreted, object-oriented and high-level programming language, which is different from a compiled one like C/C++/Java. Its.
Introduction to.
CS230 Tutorial Week 3.
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum during.
Functional Programming with Java
Introduction to Python
PYTHON Varun Jain & Senior Software Engineer
Conditional Statements
Introduction to Python
PHP.
Units with – James tedder
Units with – James tedder
PHP an introduction.
Presentation transcript:

PHP vs. Python

Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are easy to learn are easy to extend in C, C++ and Java are extremely portable. They run on almost all platforms in existence without recompilation. support for variable number of function arguments.

Similarities have the ability to freeze live objects in a string representation (for storing arbitrary objects on disk, moving them over the network, etc); they can then be converted back to identical objects with data intact.

Differences – What Python Lacks syntax from C and Perl, with lots curly braces and dollar signs the 'switch' statement and 'do... while' construct increment and decrement and assignment operators (assignment is a statement only in Python) the ternary operator/statement (... ?... :...)

Differences – What Python Lacks schizophrenic tableau of function names. The builtin library has a wide variety of naming conventions. There are no namespaces, so functions often have prefixes to denote their source (but often not). Functions are often placed into classes to simulate namespaces.

Differences – What Python Lacks a very casual language where all variables are "set" (to NULL), and a somewhat weak type system (not to be confused with dynamic types) an expedient (commonly installed) environment references ('$a =& $b' means that when $b changes, $a changes also)

Differences – What Python Lacks one array type that doubles as a list and a dictionary. Dictionary keys are iterated in their original order. private, protected and public modifiers for both properties and methods abstract and final modifiers for both classes and methods interfaces

Differences – What PHP Lacks a general purpose programming language (not just for the web) indentation is used to mark out block structure rather than curly braces namespaces and modules a small core very clear, concise, and orthogonal syntax

Differences – What PHP Lacks it is self documenting with docstrings and pydoc keyword arguments to functions and methods, easy support for default arguments true object orientation and 'first class' classes and functions

Differences – What PHP Lacks classes are used extensively in the standard library a notion of private attributes multiple inheritance object-oriented file handling method chaining excellent introspection

Differences – What PHP Lacks everything is a reference one 'del' statement for all data types. consistent case sensitivity (PHP functions are case insensitive, but variables are case sensitive) a simple array slicing syntax lambdas and other builtin functional programming constructs

Differences – What PHP Lacks iterators structured exception handling operator overloading SWIG integration threading an excellent profiler several debuggers and IDEs lots of high-level data types (lists, tuples, dicts, mx.DateTimes, NumPy arrays, etc.)

Differences – What PHP Lacks differentiation between arrays (lists) and associative arrays (dictionaries). dates that aren't limited to UNIX timestamps ( 2038) cached byte-code compilation a standardized database API support for all major GUI frameworks strong internationalization and UNICODE support

Differences – What PHP Lacks maturity, stability and upward- compatibility tends to lead to much more scalable applications -- importing modules is safer than textually including code as in PHP: global variables are not used to exchange information.

Benchmarking

Benchmarking

Conclusion PHP’s big core uses huge amount of resources as compared to Python.

References chives/27-Benchmark-PHP-vs.-Python-vs.- Perl-vs.-Ruby.html chives/27-Benchmark-PHP-vs.-Python-vs.- Perl-vs.-Ruby.html -note-difference-between-php-and.html -note-difference-between-php-and.html Oriented-Programming-in-PHP.html Oriented-Programming-in-PHP.html