Danu6.it.nuigalway.ie

Samples
This page has an error in the php code on purpose, and is displayed for debugging reasons.
If you wish to suppress the error message then change the error_reporting and ini_set options in your php page.
Refer to the php source shown below.

Warning: Undefined variable $bar in /var/www/html/samples/showerrors.php on line 17

PHP Code to generate the above:


<?php 

// set the error message level for this page
error_reporting(E_ALL);
// decide whether to show the error or not
ini_set('display_errors'1);

// this triggers a notice error: $bar uninitialized
$foo $bar

// no notice, although $bar itself has never been initialized (with "$bar = array()" for example)
$bar['foo'] = 'hello'

$bar = array('foobar' => 'barfoo');
$foo $bar['foobar'// ok

// uncommenting the line below will stop the script executing as it is an Error
//$foo = $bar['nope'] // Parse Error

?>