3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function handler($e){ echo $e->getMessage(); } class AcessDeniedException extends Exception{ public function __construct(){ parent::__construct(); echo 'This is my exception'; } } set_exception_handler (handler); if(false){ throw new AcessDeniedException('Access DENIED!!!!!' , 1); }
based on kE63J
Output for 7.2.0
Warning: Use of undefined constant handler - assumed 'handler' (this will throw an Error in a future version of PHP) in /in/KXfcW on line 16
Output for 5.3.22 - 7.1.10
Notice: Use of undefined constant handler - assumed 'handler' in /in/KXfcW on line 16