~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to tests/run-test/test005.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Error message handling (without ZendOptimizer)
 
3
--SKIPIF--
 
4
<?php
 
5
!extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is loaded");
 
6
?>
 
7
--FILE--
 
8
<?php
 
9
// If this test fails ask the developers of run-test.php
 
10
//
 
11
// We check the general ini settings which affect error handling
 
12
// and than verify if a message is given by a division by zero.
 
13
// EXPECTF is used here since the error format may change but ut 
 
14
// should always contain 'Division by zero'.
 
15
var_dump(ini_get('display_errors'));
 
16
var_dump(ini_get('error_reporting'));
 
17
var_dump(ini_get('log_errors'));
 
18
var_dump(ini_get('track_errors'));
 
19
ini_set('display_errors', 0);
 
20
var_dump(ini_get('display_errors'));
 
21
var_dump($php_errormsg);
 
22
$error = 1 / 0;
 
23
var_dump($php_errormsg);
 
24
?>
 
25
--EXPECTF--
 
26
string(1) "1"
 
27
string(4) "4095"
 
28
string(1) "0"
 
29
string(1) "1"
 
30
string(1) "0"
 
31
NULL
 
32
string(%d) "%sivision by zer%s"