Intermediate PHP

4,586 views
4,521 views

Published on

This is a "PHP 201" presentation that was given at the December 2010 Burlington, Vermont PHP Users group meeting. Going beyond the basics, this presentation covered working with arrays, functions, and objects.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,586
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
67
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • Reading from an associative array\n
  • Writing to an associative array\n
  • Appending to an associative array\n
  • Appending to an enumerative array\n
  • Writing to an enumerative array\n
  • \n
  • Iterating values in an enumerative array\n
  • Iterating key value pairs in an enumerative array\n
  • Iterating key value pairs in an associative array\n
  • \n
  • Implode returns a string, not an array.\n
  • Explode returns an array.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • The SPL in PHP 5.3 has new data structures that can make stacks and queues more performant and memory efficient.\n
  • \n
  • Example of an array used as a stack (FILO)\n
  • \n
  • Example of an array used as a queue (FIFO)\n
  • \n
  • \n
  • \n
  • The number of internal functions will depend on which extensions you have installed.\n
  • The multibyte string (mbstring) extension allows you to safely manipulate multibyte strings (e.g. UTF-8).\n
  • \n
  • \n
  • This function finds the highest array key and adds one.\n
  • \n
  • You can type hint on array and class names, but not primitive data types like strings and integers.\n
  • \n
  • This function determines if a post is published based on its published date and whether or not it’s a draft.\n
  • \n
  • This is essentially the same as the previous function but allows you to specific when “now” is.\n
  • \n
  • throw new InvalidArgumentException();\n
  • \n
  • \n
  • \n
  • We already know about variables and functions now!\n
  • "Anonymous" as they are not of any specific class; they're basically equivalent to "bare objects" or "object literals" in JavaScript.\n
  • \n
  • \n
  • \n
  • Definitions may not use computations or runtime values (other than constants); they must be concrete.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Interfaces can extend other interfaces. Methods in interfaces must be public.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • If you want the latter, use namespaces!\n
  • \n
  • \n
  • \n
  • ×