
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Malhar Lathkar has Published 154 Articles

Malhar Lathkar
1K+ Views
IntroductionPHP allows a series of catch blocks following a try block to handle different exception cases. Various catch blocks may be employed to handle predefined exceptions and errors as well as user defined exceptions.ExampleFollowing example uses catch blocks to process DivisioByZeroError, TypeError, ArgumentCountError and InvalidArgumentException conditions. There is also a ... Read More

Malhar Lathkar
369 Views
IntroductionPrior to version 7, PHP parser used to report errors in response to various conditions. Each error used to be of a certain predefined type. PHP7 has changed the mechanism of error reporting. Instead of traditional error reporting, most errors are now reported by throwing error exceptions.If error exceptions go ... Read More

Malhar Lathkar
2K+ Views
IntroductionThere is a peculiar behaviour of finally block when either try block or catch block (or both) contain a return statement. Normally return statement causes control of program go back to calling position. However, in case of a function with try /catch block with return, statements in finally block are ... Read More

Malhar Lathkar
410 Views
IntroductionCode in finally block will always get executed whether there is an exception in ry block or not. This block appears either after catch block or instead of catch block.catch and finally blockIn following example, both catch and finally blocks are given. If execption occurs in try block, code in ... Read More

Malhar Lathkar
988 Views
IntroductionException class implements Throwable interface and is base class for all Exception classes, predefined exceptions as well as user defined exceptions. The Exception class defines some final (non-overridable) methods to implement those from Throwable interface, and __tostring() method that can be overridden to return a string representation of Exception object.final public function ... Read More

Malhar Lathkar
324 Views
Definition and UsageThe rand() function returns an integer using pseudo random genaration technique. default range is between 0 and platform specific getrandmax(). On 64 bit Windows OS, it is 2147483647. The rand() function can be called without arguments (in which case the default range will be used) or by specifying ... Read More

Malhar Lathkar
188 Views
Definition and UsageConstantValueDescriptionM_PI3.14159265358979323846PiM_E2.7182818284590452354Euler Number eM_LOG2E1.4426950408889634074log2 eM_LOG10E0.43429448190325182765log10 eM_LN20.69314718055994530942loge 2M_LN102.30258509299404568402loge10M_PI_21.57079632679489661923pi/2M_PI_40.78539816339744830962pi/4M_1_PI0.318309886183790671541/piM_2_PI0.636619772367581343082/piM_SQRTPI1.77245385090551602729sqrt(pi)M_2_SQRTPI1.128379167095512573902/sqrt(pi)M_SQRT21.41421356237309504880sqrt(2)M_SQRT31.73205080756887729352sqrt(3)M_SQRT1_20.707106781186547524401/sqrt(2)M_LNPI1.14472988584940017414loge(pi)M_EULER0.57721566490153286061Euler constantPHP_ROUND_HALF_UP1Round halves upPHP_ROUND_HALF_DOWN2Round halves downPHP_ROUND_HALF_EVEN3Round halves to even numbersPHP_ROUND_HALF_ODD4Round halves to odd numbersNANNANNot A NumberINFINFInfinityRead More

Malhar Lathkar
144 Views
Definition and UsageThe tanh() function returns the hyperbolic tangent ratio of given angle in radians. In trigonometry, hyperbolic tangent ratio is defined as.tanh(x) = sinh()/tanh()This function returns a float value .Syntaxtanh ( float $arg ) : floatParametersSr.NoParameter & Description1argA floating point value that represents angle in radiansReturn ValuesPHP tanh() function returns hyperbolic tangent ratio of ... Read More

Malhar Lathkar
159 Views
Definition and UsageThe tan() function returns the tangent ratio of given angle in radians. In trigonometry, tangent of an angle is defined as ratio of lengths of opposite side and adjacent side.tan(x) = opposite/adjacenttangent of an angle is also defined as ratio of its sine and cosinetan(x) = sin(x)/cos(x)If x=45 ... Read More

Malhar Lathkar
335 Views
Definition and UsageThe srand() function is used to seed the random number generaror. Seeding initializes the random number generator. Most random number generators need initial seeding. In PHP, use of srand() function is optional as it is done automatically.This function doen't have any return value.Syntaxsrand ([ int $seed ] ) ... Read More