<?php
class SomeException extends Exception {
}
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 SomeException("yo");
return $domains;
}
function register2($domainKeys, $subdomains) {
try {
register($domainKeys, $subdomains);
}
catch(Exception $e) {
trow new Exception($e->getMessage(), $e->getCode(), $e);
}
}
var_dump(register2(null, (array)$nonset));
- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0 - 7.0.1
- Parse error: syntax error, unexpected 'new' (T_NEW) in /in/GtZv5 on line 31
Process exited with code 255.
preferences:
181.75 ms | 1395 KiB | 25 Q