PHP 8.5.0 Alpha 1 available for testing

Voting

: max(zero, three)?
(Example: nine)

The Note You're Voting On

cspray at gmail dot com
14 years ago
Useful to know that if you pass a string into the construct and the class cannot be instantiated for some reason a SPL LogicException will be thrown.

This code was ran on a Mac OS X 10.6.7, AMP, PHP 5.3+

<?php

// index.php
try {
$ReflectedClass = new ReflectionClass('NonExist');
} catch (
LogicException $logicDuh) {
print_r($logicDuh);
}

?>

Will return a deeply nested array full of useful information about the error.

<< Back to user notes page

To Top