Expand|Select|Wrap|Line Numbers
- doSomething() or doSomethingElse()
I've tried to do the same thing:
Expand|Select|Wrap|Line Numbers
- <?php
- function doSomething($x)
- {
- if ( $x != 0 )
- {
- throw new Exception('error!');
- }
- }
- function doSomethingElse()
- {
- print 'something else';
- }
- doSomething(0) or doSomethingElse();
- ?>
And yes, I know about "try...catch"; I just like to have a one-liner alternative.