a bit behind on grading
will lecture on ruby/python but will lab on perl/php

php:

some things everyone should know about php:

	runs on the server to produce dynamic content
	supports cgi and sql easily
	has regular expressions and associative arrays
	perl = awk + sh
	php = perl / (cgi+sql)

	1994	rasmus lerdorf wanted to count hits on his online resume
	1995 	v2 personal home page forms interpreter
	1996	15,000 sites
	1997	50,000 sites
	1998	o-o/extensible v3 suraski-gutmans (PHP: hypertext preprocessor)
	1999	v4 zend-engine 1.0
			separated php scripting from web interface
			"hi-performance parsing and compilation"
			interfacing extensible sql, http, ftp
			overloading the o-o syntax for interfacing java and .net
	2000	3,300,000 sites
	2003	12-14 million domains
	2004	v5

	domains & ip-address trend: 
	http://www.php.net/usage.php

	google hits & trend:
	http://www.tiobe.com/tpci.htm

	php is easy to learn!
	php programming is quick and easy! 
	php interpreter and syntax are forgiving! 
	php is popular and cool!
	php is more open than closed (viz. bsd)
	php code is fairly mobile!
	php is weakly and dynamically typed!
	more:
		http://hotwired.lycos.com/webmonkey/99/46/index1a_page6.html?tw=programming

	BUT

	global config parameters can change semantics (think of shells) ...
	not a fast run-time language...
	for example...
		http://www.bagley.org/~doug/shootout/lang/php/
			AVG RANKS

			cpu	memory	brevity 
					(loc)
		mawk	14th	7th	5th
		gawk	18th	15th	5th
		ruby	20th	17th	6th
		lisp	17th	22nd	7th
		(xemacs)
		perl	15th	15th	8th
		python	19th	14th	8th
		php	25th	20th	9th
		scheme
		(guile)	21st	16th	9th
		bash	6th	5th	10th
		tcl	21st	14th	14th
		javascript
		(njs)	16th	13th	14th
		c++	6th	6th	18th
		(g++)
		java	14th	24th	18th
		c	2nd	1st	20th
		(gcc)

	namespace is a junkyard ...
	dubious scalability ...
	"ugly and unpredictable" type system
	php manual looks like a guestbook
		http://us4.php.net/manual/en/index.php

		BUT is easy to guess, e.g. php.net/echo

		and so many help sites... i like
		http://aspn.activestate.com/ASPN/docs/ASPNTOC-PHPMAN____/

	for example...
		http://www.ukuug.org/events/linux2002/papers/html/php/index.html



some things ONLY I know about php:

	in the past three months, google hits normalized to FORTRAN:

		asp+net		+144%
		ruby		+143%
		awk/gawk	+61%
		php		+55%
		asp		+6%
		python		+2%
		perl		-3%
		java		-41%

	e.g., http://www.cs.wustl.edu/~loui/languages.html

	and #9 on raw hits:

		word + programming language
		*1000
			word + language
			*1000
					word

		9,490	113,000		html		
		9,280	12,700		java		
		7,720	28,500		basic		
		5,480	8,930		c++		
		5,260	67,800		c		
		3,560	8,170		perl		
		3,100	15,300		asp		
		2,980	21,300		xml		
		2,550	15,000		php		
		2,360	6,980		sql		
		1,930	5,280		python		
		1,500	16,900		javascript	
		974	4,020		asp+net		

	e.g., http://www.cs.wustl.edu/~loui/languages

	%positive vs. negative comments:

source: google.com.  date:  3/26/2004.  method:  see 
http://www.cs.wustl.edu/~loui/langtrends/varies.awk

	POSITIVES-NEGATIVES
100%	           191-0	apl
100%	            16-0	javabeans
100%	             3-0	algol
100%	             1-0	mawk
100%	             1-0	babbage
97%	          891-20	csharp
94%	          715-38	tex
92%	        4519-376	basic
92%	          635-50	asp net
91%	        4467-395	ruby
90%	        4509-458	python
90%	          327-35	ada
89%	          205-25	mathematica
88%	          112-14	xemacs
86%	          165-26	ml
85%	            46-8	common-lisp
83%	      16665-3208	php
83%	             5-1	gawk
82%	      20769-4472	html
82%	          230-48	prolog
81%	         745-169	forth
80%	          314-77	matlab
78%	       5864-1643	scheme
77%	          181-52	awk
76%	       3522-1065	xml
76%	          319-98	tcl
74%	      11413-3898	c
72%	       6159-2384	perl
70%	         633-267	lisp
69%	         297-128	openGL
68%	           83-38	show and tell
67%	         207-101	corba
65%	       7499-3991	java
65%	         259-138	cold fusion
60%	         323-209	pascal
59%	         197-133	postscript
57%	        1292-955	latex
55%	       1386-1103	javascript
55%	         965-783	sql
52%	       1693-1523	asp
46%	       1357-1548	c++
40%	          83-122	cobol
32%	          85-173	fortran
28%	           10-25	elisp
8%	            5-53	modula

	php is a great language for non-programmers!

	php is so good at cgi that it is hard to use it for other things.

	php may be the cs1 language in the future.  
		(scheme was not a great idea.  pascal was not a great idea.
		java was a bad idea.
		
		but i'd prefer gawk, perl, asp, or a return to basic for CS1)


HOW-TO's