TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
314 B

<?php
function inverse($x) {
return number_format(1.0 / $x, 2);
}
function main() {
try {
echo inverse(5.0) . "\n";
echo inverse(0) . "\n";
} catch (DivisionByZeroError $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
} finally {
echo "Finally\n";
}
}