<?php
class A {
function __construct($i){
if ($i > 10) {
throw new Exception("valor maior que 10");
}
}
}
try {
$a = new A(50);
if (!is_null($a)) {
echo $a;
}
} catch(Exception $e) {
$a = null;
echo $a;
}
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/qgTC8 on line 7
Process exited with code 255.