PHP

212
2834 reads

February 8, 2013

boolean operators on boolean values


this example shows some boolean operators like
AND
OR
XOR
and not

84
1389 reads

February 8, 2013

logical operators on variables


this example to show some boolean operators like equal, not equal, greater than, greater than or equal, and identical

49
1460 reads

February 8, 2013

arithmetic operator


these are some arithmetic operations, the most simple ones the programmer can use

41
1409 reads

February 8, 2013

scope of parameters


this example shows that sending a function a parameter does not affect its value at the rest of the code outside the function

289
3223 reads

February 8, 2013

scopes of variables


this example shows the concept of scope with a clear example to 3 types of scopes
1- local scope
2- global scope
3- static scope

144
1402 reads

February 8, 2013

defining variables and changing their types


this examples shows how to create and give variables values and the right PHP statement components
and it also shows how the types in php can be changed easily without casting

30
408 reads

February 8, 2013

Multiple Exceptions


It is possible for a script to use multiple exceptions to check for multiple conditions. It is possible to use several if..else blocks, a switch, or nest multiple exceptions.
32
1430 reads

February 8, 2013

Custom Exception Class


Creating a custom exception handler is quite simple. We simply create a special class with functions that can be called when an exception occurs in PHP.
31
1407 reads

February 8, 2013

Try Catch Throw


Proper exception code should include: Try - A function using an exception should be in a "try" block. If the exception does not trigger, the code will continue as normal.
27
1375 reads

February 8, 2013

Basic Use of Exception


Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception.