...
/Quiz: Avoiding Traps When Using PHP 8 Extensions
Quiz: Avoiding Traps When Using PHP 8 Extensions
Test your understanding of avoiding traps while using PHP 8 extensions.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What would be the output of the following code in PHP 8?
<?php
$url = 'https://unlikelysource.com/';
$ch = curl_init($url);
if (is_resource($ch)) {
echo "Connection Established\n";
} else {
throw new Exception('Unable to establish connection');
}
?>
A.
Connection Established
B.
Notice
C.
Warning
D.
Fatal Error: Unable to establish connection
1 / 5
...