Profile Picture
IT Made Easy
The site provides some rough IT Notes that make your life easier. The site currently has notes on HTML, CSS, Regex, OOPS, JS, JQuery, PHP, Java, ASP.NET, C#, Database, Linux, URL Rewrite, SEO, Project Management and Hosting. Please do share this site if you like.

Data Types

Next
Next
  • The seven types are:

Scalar = string, integer, float, boolean

Composite = array, object

Additional Types = NULL, resource

  • PHP considers the number false, 0, 0.000, , 0, arr[], NULL to be false, and everything else to be true
  • Integers are stored in 2s complement system where the negative numbers are represented by the two's complement of the absolute value (-2 = 2s complement of 2 = 2s complement of absolute value of 2 = 2s complement of 0010 => 1101+1=> 1110)
  • For boolean XOR is denoted by ^ which is set if they are set in either operand and unset otherwise. Complement of 0 is 1 because ~0000 = 1111. This is 2s complement of 1111 => - (0000+1) = - (0001) = -1. So in PHP ~N = -N-1
  • For modules the sign is that of division and value as if it is applied on positive operands
  • NULL means either not initialized or is initialized with special value NULL
  • Resource handles external resources

IT Notes

by VinodSebastian



IT Downloads


Catalogue