Remember that engineering is work, and no document will substitute for your own thinking, learning and experimentation.
- Play with something.
- Read the documentation on it.
- Play with it some more.
- Read documentation again.
- Play with it some more.
It's important to recognize that in PHP an array does not always behave like a traditional array. It's actually more representative of an ordered hashmap. Thus it maintains order, but consists of key/value pairs. A key, in a PHP array, is always unique, but can be either an integer or a string. If the string key can be cast to an integer then PHP will carry out this operation implicitly. Also, array keys do not determine the order of elements in a PHP array.
With this in mind, we can better understand how different operations, like diff, intersect, union, and merge, would be carried out on a native PHP array. Some of these operations rely on the array keys and others on the values in the array.
Month, Year | Standard deviations from previous month | Standard deviation for the year | |
---|---|---|---|
Jan, 2009 | 0.85048380530504 | 758.39186587293 | |
Feb, 2009 | 0.17141534060412 | 758.39186587293 | |
Mar, 2009 | 0.17668965877655 | 758.39186587293 | |
Apr, 2009 | 0.088344829388276 | 758.39186587293 | |
May, 2009 | 0.28085744268213 | 758.39186587293 | |
Jun, 2009 | 0.52347607861411 | 758.39186587293 | |
Jul, 2009 | 0.60127227165752 | 758.39186587293 | |
Aug, 2009 | 0.2149284655267 | 758.39186587293 | |
Sep, 2009 | 0.097574886190036 | 758.39186587293 |
Month | Year | questions | |
---|---|---|---|
Aug | '08 | 162 | |
Sep | '08 | 492 | |
Oct | '08 | 623 | |
Nov | '08 | 507 | |
Dec | '08 | 481 | |
Jan | '09 | 645 | |
Feb | '09 | 775 | |
Mar | '09 | 909 | |
Apr | '09 | 976 |
In this lesson, we're going to learn about classes, how they're defined, how they're instantiated, and how those instances are used.
We'll be covering the following in this lesson:
The Http
interface SHOULD define the standardized methods and constants upheld by implementing classes. All classes should be obligated to implement such methods and constants, but MAY NOT be limited to only these methods or constants.
abstract class HttpMessage
{
protected $headers = array();
protected $body = "";
<?php | |
/** | |
* Translate a clock formatted string into a sum of seconds | |
* e.g. toSec("3:20") == 200 | |
*/ | |
function toSec($clock) { | |
$eq = array(1, 60, 3600, 86400); | |
$seconds = 0; | |
$parts = explode(':', $clock, count($eq)); | |
$parts = array_reverse($parts); |
#!/usr/local/bin/php | |
<?php | |
/** | |
* Keypad input over STDIN (using non-blocking I/O) | |
*/ | |
$base = event_base_new(); | |
$input = event_new(); | |
googleguy@googleguy-pc:~/aa/test$ php -dvld.active=1 /tmp/static.php | |
Finding entry points | |
Branch analysis from position: 0 | |
Return found | |
filename: /tmp/static.php | |
function name: (null) | |
number of ops: 9 | |
compiled vars: none | |
line # * op fetch ext return operands | |
--------------------------------------------------------------------------------- |
/** | |
* Find which variables in the current scope reference which other variables. | |
* | |
* mixed ref_info ( string $variable_name ) | |
* - Returns an associative array of variable names that are references of the supplied varriable name argument. | |
* Returns false on failure. | |
*/ | |
PHP_FUNCTION(ref_info) | |
{ | |
char *str; |