PHP is an interpreted scripting language commonly used for web development. It allows embedding scripts in HTML pages using escapes and can also be used for command line and GUI applications. PHP has a large number of built-in functions that make it easy to work with forms, files, databases, protocols, and more. While easy to get started with, PHP may not be the best choice for large, complex projects due to lack of type safety and its treatment of objects and classes.
The document discusses the state of Hadoop in 2009 and goals for 2010 and beyond. It focuses on improving data formats by proposing the use of Apache Avro, which provides an expressive, compact, and dynamic data serialization system with built-in capabilities for data sharing, remote procedure calls, and schema evolution. The document outlines how Avro could address current issues with data formats in Hadoop and its potential inclusion in future Hadoop releases.
The document discusses Apache Avro, a data serialization framework. It provides an overview of Avro's history and capabilities. Key points include that Avro supports schema evolution, multiple languages, and interoperability with other formats like Protobuf and Thrift. The document also covers implementing Avro, including using the generic, specific and reflect data types, and examples of writing and reading data. Performance is addressed, finding that Avro size is competitive while speed is in the top half.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
Daniel Glazman, W3C CSS Working Group Chair and Web Tech Lead from Samsung OSG, discusses how CSS 3 and stylesheets will affect web standards in the future.
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of structured documents written in HTML or XML. CSS separates document content from document presentation, including elements like layout, colors, and fonts. Using CSS allows for easier maintenance, greater accessibility, and reduced development time compared to only using HTML.
A presentation to Refresh DC about the emerging HTML 5 and CSS 3 standards, namely about aspects that are beginning to become applicable to web design and development. Given by Jason Garber and M. Jackson Wilkinson.
25 Festive Fonts For Women Oriented Businesses!DesignMantic
Fonts depict brand’s personality. Fonts must connect to the target audience. DesignMantic has scouted 25 variety of fonts that carry a feminine touch perfect for the women oriented business.
Design Thinking: Finding Problems Worth Solving In HealthAdam Connor
Ideas for new devices and services can come from anywhere. But great ideas come from aligning solutions with real value and desirability for people. Design thinking provides a set of principles and structure that can act as scaffolding for teams to find and understand challenges and opportunities to focus on fan find solutions for.
The document discusses the state of Hadoop in 2009 and goals for 2010 and beyond. It focuses on improving data formats by proposing the use of Apache Avro, which provides an expressive, compact, and dynamic data serialization system with built-in capabilities for data sharing, remote procedure calls, and schema evolution. The document outlines how Avro could address current issues with data formats in Hadoop and its potential inclusion in future Hadoop releases.
The document discusses Apache Avro, a data serialization framework. It provides an overview of Avro's history and capabilities. Key points include that Avro supports schema evolution, multiple languages, and interoperability with other formats like Protobuf and Thrift. The document also covers implementing Avro, including using the generic, specific and reflect data types, and examples of writing and reading data. Performance is addressed, finding that Avro size is competitive while speed is in the top half.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
Daniel Glazman, W3C CSS Working Group Chair and Web Tech Lead from Samsung OSG, discusses how CSS 3 and stylesheets will affect web standards in the future.
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of structured documents written in HTML or XML. CSS separates document content from document presentation, including elements like layout, colors, and fonts. Using CSS allows for easier maintenance, greater accessibility, and reduced development time compared to only using HTML.
A presentation to Refresh DC about the emerging HTML 5 and CSS 3 standards, namely about aspects that are beginning to become applicable to web design and development. Given by Jason Garber and M. Jackson Wilkinson.
25 Festive Fonts For Women Oriented Businesses!DesignMantic
Fonts depict brand’s personality. Fonts must connect to the target audience. DesignMantic has scouted 25 variety of fonts that carry a feminine touch perfect for the women oriented business.
Design Thinking: Finding Problems Worth Solving In HealthAdam Connor
Ideas for new devices and services can come from anywhere. But great ideas come from aligning solutions with real value and desirability for people. Design thinking provides a set of principles and structure that can act as scaffolding for teams to find and understand challenges and opportunities to focus on fan find solutions for.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is influenced by C and supports features like functions, arrays, and object-oriented programming. It provides a large standard library for common tasks like string handling, dates, files, and working with databases.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf and Zeev Suraski. PHP scripts can be embedded into HTML pages and is commonly used to connect web pages with backend databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
The document discusses SEO friendly WordPress plugins. It recommends installing plugins like Adsense-Deluxe, WP-Head, Jerome's Keywords, and Google Sitemaps to improve SEO. It provides instructions on downloading, installing, and configuring the plugins. Specifically, it outlines how Adsense-Deluxe allows placing Google Adsense ads in posts by using comment tags and customizing ad sizes and colors.
WordPress is a content management system that allows users to create blogs and websites. This document provides an overview of the basic WordPress features and functions for beginner users, including how to create an account, log in, use the dashboard interface, write and publish blog posts, create pages and categories, customize the design theme and header, and manage comments. The 12-page document covers all the essential WordPress functions a new user needs to get started blogging.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is influenced by C and supports features like functions, arrays, and object-oriented programming. It provides a large standard library for common tasks like string handling, dates, files, and working with databases.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is used to dynamically generate web page content. As a scripting language, PHP is interpreted and can interact with databases, web servers, and other applications through its extensive function libraries.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf and Zeev Suraski. PHP scripts can be embedded into HTML pages and is commonly used to connect web pages with backend databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
PHP is a scripting language originally created for web development and now used as a general purpose programming language. Key developers include Rasmus Lerdorf, Zeev Suraski, and Andi Gutmans. PHP scripts can be embedded into HTML pages and is commonly used to connect web applications with databases. PHP is open source, has a C-like syntax, and an extensive function library that makes it well suited for web development tasks.
The document discusses SEO friendly WordPress plugins. It recommends installing plugins like Adsense-Deluxe, WP-Head, Jerome's Keywords, and Google Sitemaps to improve SEO. It provides instructions on downloading, installing, and configuring the plugins. Specifically, it outlines how Adsense-Deluxe allows placing Google Adsense ads in posts by using comment tags and customizing ad sizes and colors.
WordPress is a content management system that allows users to create blogs and websites. This document provides an overview of the basic WordPress features and functions for beginner users, including how to create an account, log in, use the dashboard interface, write and publish blog posts, create pages and categories, customize the design theme and header, and manage comments. The 12-page document covers all the essential WordPress functions a new user needs to get started blogging.
This document provides an introduction to CSS (Cascading Style Sheets) which allows separation of content and style for web pages. CSS is a W3C standard that all major browsers support. CSS controls formatting of HTML elements through style rules consisting of a selector and declaration. It gives developers more control over page layout and appearance across browsers. CSS separates concerns of content defined in HTML from visual presentation defined by CSS stylesheets.
The document provides an overview of basic CSS concepts including what CSS is, why it's used, CSS syntax, selectors like element, class, ID and pseudo selectors, and common CSS properties for styling like color, background, fonts, text, lists, and borders. CSS is used to control the presentation and layout of HTML documents and allows separation of HTML semantic content from visual design.
The document provides an overview of HTML elements for formatting text, images, links, lists, tables and more. It defines common HTML tags like <head>, <body>, <p>, <h1>-<h6>, <img>, <a>, <ul>, <ol>, <table>, <tr>, and <td> and describes their attributes and usage. The document is intended as a tutorial for basic HTML markup.
1. The document discusses Cascading Style Sheets (CSS), which provide a powerful and flexible way to specify formatting for HTML elements. CSS allows sharing style sheets across documents and websites, and defining new HTML elements through style classes.
2. CSS specifications have progressed through levels 1-3, with CSS1 supporting basic styling and newer levels adding features like media-specific stylesheets. CSS rules are applied in a hierarchical manner based on precedence rules.
3. Styles can be specified through internal and external style sheets, as well as inline styles. Class selectors allow defining reusable styles, while ID selectors target unique elements. Font properties, text properties, and foreground/background properties can all be controlled through
The document introduces Chirp Spread Spectrum (CSS) technology. CSS uses frequency modulated chirp pulses that are resistant to multipath interference and Doppler shifts, making it robust and suitable for mobile applications. Test results show CSS can transmit at 1Mbps over 5m using 1uW of power and over 26m using 6.3mW. Outdoor tests achieved transmissions up to 9.8km using 1W of power, demonstrating CSS's extended range capabilities. The document suggests CSS could enable applications requiring robustness, mobility, or ranging accuracy better than 0.5m.
This document provides a tutorial on using PHP and MySQL together. It introduces PHP and MySQL, outlines how to set up a database with MySQL, and includes PHP code examples for adding, querying, updating, and deleting data from the MySQL database. The PHP code examples connect to the database, validate user input, sanitize values, and perform CRUD operations on the database using MySQL queries.
- PHP is an open source scripting language used for web development that was created in 1995 and has evolved through several versions. It combines elements of Perl, C, and Java and allows embedding code in HTML.
- The document outlines the history and evolution of PHP, its core features like script tags, data types, functions, and portability between Linux and Windows. It also provides tips on debugging, tools, and resources for learning more about PHP and the upcoming PHP 5 release.
PHP is an interpreted scripting language commonly used for web development. It allows embedding scripts in HTML pages using escapes and can also be used for command line and GUI applications. PHP has a large number of built-in features and functions contributed by volunteers to perform tasks like form processing, session handling, database interaction and more. While easy to get started with, PHP may not be the best choice for large, complex projects due to lack of type safety and its treatment of objects and classes.
PHP is a widely used scripting language for web development that is embedded within HTML. It allows for control structures, functions, and object-oriented programming. Some key points:
- PHP code is inserted into HTML pages with <?php ?> tags and can output and manipulate data.
- It supports variables, functions, classes, and inheritance to organize code and build applications.
- Variables can be defined and accessed through forms, and PHP has many built-in functions for strings, files, dates, and more.
- Classes allow for object-oriented code reuse and integration with other systems through APIs. The '->' operator accesses members but does not represent pointers.
PHP originated as 'Personal Home Pages' but now stands for 'PHP Hypertext Processor'. It is a scripting language commonly used for web development and allows embedding scripts in HTML pages. PHP is a loosely typed, procedural language with C-like syntax. It has an extensive function library that provides functionality like string handling, mathematics, file input/output, and database interaction. PHP uses a three-tier architecture with the PHP script running on a web server and connecting to databases and other services.
PHP is a widely used scripting language for web development. It allows code to be embedded within HTML pages and executes on the server. Key features include:
- PHP code is embedded within HTML and "escapes in and out" of the page.
- Variables start with $ and user input data is automatically available.
- Functions and classes provide common programming capabilities. Classes allow for object-oriented programming.
1. An overview of PHP
Cristian Bogdan
What is PHP
• PHP: Hypertext Processor (or Personal Home Page?)
• This lecture goes through the doc: http://www.php.net/manual/en/
• Interpreted language
– Easy to get something done fast
– Problems when size and complexity grow
– Performance penalty (though addressed in later Zend engine)
• A number of PHP organisations and hosting services around the
net.
• A huge catalogue of features developped by volunteers
• A wide user community definately happy that they not only can
program, but they also can program for the internet…
• Language in evolution… PHP 5 adds exception handling. OOP is
also an add-on since PHP4, PHP5 perfects it
– most OOP concepts and keywords are like in java: class, extends,
interface, private, protected, etc
– exceptions are like in Java (try/catch, etc)
1
2. What can PHP do
• CGI scripting of course
– Based on escapes within HTML pages <?php
> or <% … %>
• Command line scripting
• GUI applications (PHP-GTK)
http://gtk.php.net/
Installation
• Install the PHP interpreter separately. There is
good support for this on Linux
• In the webserver configuration, associate the
php extension with the PHP interpreter
• For serious applications you will need a
database engine.
• Apache is the typical choice for the web server.
– Integrated as a module, so no supplementary
processes are created (in CGI, typically there is one
process per access, which is very expensive)
• Mysql is the typical db engine
2
3. PHP in HTML
• The most often case where PHP is used
• Escaping
– <?php …. ?>
– <? …. ?>
– <script language=”php” > ….</script>
– <% .... %>, <%=. … %> like ASP and JSP
• Like in JSP, escaping can be interrupted to write some
HTML
<?php
if ($expression) {
?>
<b>This is true.</b>
<?php } ?>
• You can see the evolution under community pressure,
here and in other areas
Types
• a variable name begins with $, no type declaration (type
declaration can be required by passing some settings to
the interpreter)
• can have one type first, another one later… (BASIC??)
• boolean, integer (similar to C), float (similar to C)
• string
– single-quoted, no character escapes
– double-quoted, like C character escapes
– <<< EOD notation to write longer multiline strings
– $a.$b appends the string b and at the end of the string a (+ in
Java)
– $a(index1, index2) gives a substring
– string functions in the function library (strlen() like in C)
– expression intergration ”some text { expression $var } blabla”
• arrays are mappings between keys and values
(Dictionary/Hashtable/Map in java)
– $arr = array("foo" => "bar", 12 => true)
• There are automactic type conversions between types
(very dangerous…). Explicit type conversions exist too
3
4. Other types
• Classes and objects, OOP
• Resources, a kind of reference
• Pseudo-types, a kind of #typedef ?
Variables
• See Types
• Assignment by value (not by reference)
• Programming for the lazy
• Lots of predefined variables, especially related
to HTTP/CGI
– _SERVER, _GET, _POST, _COOKIE, _FILES,
_REQUEST, _SESSION
• Scope of variables, globals
• Variable variables ☺
• External varialbes, useful for forms
• Functions as variables
4
5. Other procedural stuff
• Operators similar to C
• Statements similar to C, plus:
– <? if(…) : ?> ….<? endif; >
– foreach () through arrays, just values, or also keys
• foreach (array_expression as $value) statement
• foreach (array_expression as $key => $value) statement
• Code inclusion with require() and include()
• Conditional function definition (similar to C #ifdef
)
Features
• HTTP authentication, cookies, file uploads
• Remote files (like
java.net.URLConnection)
• Connections (like java.net.Socket)
• Persistent db connections
– Normally db connections are defined with
engine specific functions as external
resources. Each access would open its
connection, that is expensive
5
6. Functions
• Array functions, calendar fuctions, date
functions, character functions, IO functions,
printer, file/directory, etc
• Functions for protocols/standards, e.g. FTP,
HTTP, URL, LDAP, IRC, Mail, NSAPI, popmail,
XML/XSL, Bzip2/Zip/Zlib
• Functions for various databases (Mysql, Oracle,
MS SQL server, mSQL, PostgreSQL, SQLite,
dBase), dbx is general
• Functions for other systems/tools: e.g. Apache,
COM, Cyrus, PDF, dBase, DBM, DOM, .NET,
Lotus Notes, GNU readline, Hyperware
Conclusions
• Easy to learn from Java or C
• CGI parameters, HTTP sessions, etc are easy to
recognize
• Good language/system for doing something small fast
(but then JSP/ASP do most of the same)
• Not a wise choice for a serious/large project due to the
lack of type safety, lack of OOP in the libraries, etc.
– Experienced PHP people confirm that larger projects tend to
become a big mess due to the freedoms that seemed so good in
the begining, which make programmers lazy
• The array concept is nice, but its name is misleading
(array means something very different in all the rest of
Computer Science)
• Still, a very good choice for pragmatists who want to get
the job done.
6