3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getDomain() { return 'example.com'; } function getSubDomains() { return array('www.example.com'); } function register($domainKeys, $subdomains) { $domains = (array) getDomain(); if ($subdomains == null) { $domains = array_merge($domains, getSubdomains()); } else { $domains = array_merge($domains, $subdomains); } $san = implode(",", array_map(function ($dns) { return "DNS:" . $dns; }, $domains)); throw new Exception("yo"); } var_dump(register(null, (array)$nonset));
based on 9XfAX
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: nonset in /in/sbM3c on line 22 Fatal error: Uncaught Exception: yo in /in/sbM3c:19 Stack trace: #0 /in/sbM3c(22): register(NULL, Array) #1 {main} thrown in /in/sbM3c on line 19
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Notice: Undefined variable: nonset in /in/sbM3c on line 22 Fatal error: Uncaught exception 'Exception' with message 'yo' in /in/sbM3c:19 Stack trace: #0 /in/sbM3c(22): register(NULL, Array) #1 {main} thrown in /in/sbM3c on line 19
Process exited with code 255.