Sunday 4 March 2012

PHP: Variable Handling Functions

  1. debug_zval_dump — Dumps a string representation of an internal zend value to output
  2. doubleval — Alias of floatval
  3. empty — Determine whether a variable is empty
  4. floatval — Get float value of a variable
  5. get_defined_vars — Returns an array of all defined variables
  6. get_resource_type — Returns the resource type
  7. gettype — Get the type of a variable
  8. import_request_variables — Import GET/POST/Cookie variables into the global scope

PHP: Array Related Functions

  1. array_change_key_case — Changes all keys in an array
  2. array_chunk — Split an array into chunks
  3. array_combine — Creates an array by using one array for keys and another for its values
  4. array_count_values — Counts all the values of an array
  5. array_diff_assoc — Computes the difference of arrays with additional index check
  6. array_diff_key — Computes the difference of arrays using keys for comparison
  7. array_diff_uassoc — Computes the difference of arrays with additional index check which is performed by a user supplied callback function
  8. array_diff_ukey — Computes the difference of arrays using a callback function on the keys for comparison

An Introduction to PHP Functions


A function is an input/output “machine”. A function accepts values, processes them and then returns an action.

1. Defining a Function
Functions are defined by using the functions statement :
function someFunction($argument, $argument){

 //function code here

}


Thursday 1 March 2012

Hacker: Some Terms of the Trade

The notion that a hacker is this nerdy geek who sits behind his computer for days on end is, although not far off, is pretty much incorrect. The general populous might imagine these almost alien like figures of computing culture to be on a vindictive, vandalistic course of destruction as a result of some sort of troublesome childhood.

Technically this may all be vaguely correct but generally there is very little known about this tech sub-culture that has been around for, well, as long as the computer itself. Generally speaking hackers are the good guys. They are against monopolies, dictatorship and censorship and tend to have a very good sense of what's right and wrong without having any political agendas. But, as with anything good and pure, there are the bad apples.