<?php
restore_error_handler();
// funzione di gestione dell'errore
function myErrorHandler ($errno, $errstr, $errfile, $errline) {
switch ($errno) {
case FATAL:
echo "<b>FATAL</b> [$errno] $errstr<br>\n";
echo " Fatal error in line ".$errline." of file ".$errfile;
echo ", PHP ".PHP_VERSION." (".PHP_OS.")<br>\n";
echo "Aborting...<br>\n";
die('You cannot call this script directly !');
break;
case ERROR:
echo "<b>ERROR</b> [$errno] $errstr<br>\n";
break;
case WARNING:
echo "<b>WARNING</b> [$errno] $errstr<br>\n";
break;
default:
echo "Unkown error type: [$errno] $errstr<br>\n";
break;
}
}
// funzione di prova del gestore di errore
function scale_by_log ($vect, $scale) {
if ( !is_numeric($scale) || $scale <= 0 )
trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale",
FATAL);
if (!is_array($vect)) {
trigger_error("Incorrect input vector, array of values expected", ERROR);
return null;
}
for ($i=0; $i<count($vect); $i++) {
if (!is_numeric($vect[$i]))
trigger_error("Value at position $i is not a number, using 0 (zero)",
WARNING);
$temp[$i] = log($scale) * $vect[$i];
}
return $temp;
}
// configura il gestore dell'errore definito dall'utente
$old_error_handler = set_error_handler("myErrorHandler");
// attiva alcuni errori, definendo prima un array misto con elementi non numerici
echo "vector a\n";
$a = array(2,3,"foo",5.5,43.3,21.11);
print_r($a);
// genera il secondo array, generando un avviso
echo "----\nvector b - a warning (b = log(PI) * a)\n";
$b = scale_by_log($a, M_PI);
print_r($b);
// questo è il problema, passiamo una stringa al posto di un array
echo "----\nvector c - an error\n";
$c = scale_by_log("not array",2.3);
var_dump($c);
// errore critico, il log di zero o di un numero negativo non è definito
echo "----\nvector d - fatal error\n";
$d = scale_by_log($a, -2.5);
?>
vector a
Array
(
[0] => 2
[1] => 3
[2] => foo
[3] => 5.5
[4] => 43.3
[5] => 21.11
)
----
vector b - a warning (b = log(PI) * a)
Fatal error: Uncaught Error: Undefined constant "WARNING" in /in/qOObA:37
Stack trace:
#0 /in/qOObA(53): scale_by_log(Array, 3.1415926535898)
#1 {main}
thrown in /in/qOObA on line 37
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
vector a
Array
(
[0] => 2
[1] => 3
[2] => foo
[3] => 5.5
[4] => 43.3
[5] => 21.11
)
----
vector b - a warning (b = log(PI) * a)
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be int, string given<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] A non-numeric value encountered<br>
Array
(
[0] => 2.2894597716988
[1] => 3.4341896575482
[2] => 0
[3] => 6.2960143721717
[4] => 49.566804057279
[5] => 24.165247890281
)
----
vector c - an error
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be int, string given<br>
NULL
----
vector d - fatal error
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be int, string given<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be int, string given<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] A non-numeric value encountered<br>
Output for 7.2.0 - 7.2.33
vector a
Array
(
[0] => 2
[1] => 3
[2] => foo
[3] => 5.5
[4] => 43.3
[5] => 21.11
)
----
vector b - a warning (b = log(PI) * a)
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] A non-numeric value encountered<br>
Array
(
[0] => 2.2894597716988
[1] => 3.4341896575482
[2] => 0
[3] => 6.2960143721717
[4] => 49.566804057279
[5] => 24.165247890281
)
----
vector c - an error
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
NULL
----
vector d - fatal error
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP)<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in /in/qOObA on line 6
Warning: Use of undefined constant ERROR - assumed 'ERROR' (this will throw an Error in a future version of PHP) in /in/qOObA on line 13
Warning: Use of undefined constant WARNING - assumed 'WARNING' (this will throw an Error in a future version of PHP) in /in/qOObA on line 16
Unkown error type: [2] A non-numeric value encountered<br>
Output for 7.1.0 - 7.1.33
vector a
Array
(
[0] => 2
[1] => 3
[2] => foo
[3] => 5.5
[4] => 43.3
[5] => 21.11
)
----
vector b - a warning (b = log(PI) * a)
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] A non-numeric value encountered<br>
Array
(
[0] => 2.2894597716988
[1] => 3.4341896575482
[2] => 0
[3] => 6.2960143721717
[4] => 49.566804057279
[5] => 24.165247890281
)
----
vector c - an error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant ERROR - assumed 'ERROR'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
NULL
----
vector d - fatal error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant FATAL - assumed 'FATAL'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] A non-numeric value encountered<br>
Output for 7.0.0 - 7.0.33
vector a
Array
(
[0] => 2
[1] => 3
[2] => foo
[3] => 5.5
[4] => 43.3
[5] => 21.11
)
----
vector b - a warning (b = log(PI) * a)
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Array
(
[0] => 2.2894597716988
[1] => 3.4341896575482
[2] => 0
[3] => 6.2960143721717
[4] => 49.566804057279
[5] => 24.165247890281
)
----
vector c - an error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant ERROR - assumed 'ERROR'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
NULL
----
vector d - fatal error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant FATAL - assumed 'FATAL'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be integer, string given<br>
vector a
Array
(
[0] => 2
[1] => 3
[2] => foo
[3] => 5.5
[4] => 43.3
[5] => 21.11
)
----
vector b - a warning (b = log(PI) * a)
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be long, string given<br>
Array
(
[0] => 2.2894597716988
[1] => 3.4341896575482
[2] => 0
[3] => 6.2960143721717
[4] => 49.566804057279
[5] => 24.165247890281
)
----
vector c - an error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant ERROR - assumed 'ERROR'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be long, string given<br>
NULL
----
vector d - fatal error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant FATAL - assumed 'FATAL'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be long, string given<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] trigger_error() expects parameter 2 to be long, string given<br>
vector a
Array
(
[0] => 2
[1] => 3
[2] => foo
[3] => 5.5
[4] => 43.3
[5] => 21.11
)
----
vector b - a warning (b = log(PI) * a)
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] Invalid error type specified<br>
Array
(
[0] => 2.2894597716988
[1] => 3.4341896575482
[2] => 0
[3] => 6.2960143721717
[4] => 49.566804057279
[5] => 24.165247890281
)
----
vector c - an error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant ERROR - assumed 'ERROR'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] Invalid error type specified<br>
NULL
----
vector d - fatal error
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant FATAL - assumed 'FATAL'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] Invalid error type specified<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [8] Use of undefined constant WARNING - assumed 'WARNING'<br>
Notice: Use of undefined constant FATAL - assumed 'FATAL' in /in/qOObA on line 6
Notice: Use of undefined constant ERROR - assumed 'ERROR' in /in/qOObA on line 13
Notice: Use of undefined constant WARNING - assumed 'WARNING' in /in/qOObA on line 16
Unkown error type: [2] Invalid error type specified<br>