phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP Operators: Error Control Operator

Tag: operator, Error Control Operator   Category: PHP Basic
post: 08 Mar 2008 read: 606


PHP Operators Step By Step Tutorial - Part 8: PHP support one operator control error with the sign of at (@). If enhanced at one particular expression of PHP, hence mistake information yielded by the expression will be disregarded. If track_errors fitur is in enable, hence mistake information yielded by the expression will be kept in the global variable $ php_errormsg. This variable content will always be changed with the new mistake information of each re-evaluation. For that, check before the re-evaluation is done first if we would like to use the existing information in it.

Pay attention to the example of using Error control operator at script as following:

File name: errorcontroloperator.php


<html>
<head>
<title>Using Error Control Operator</title>
</head>

<body>
<h1>The example for using error control operator</h1>
<?
$myfile = @file ('errorcontroloperator.ph') or 
die ("failed opening file:error was '$php_errormsg'");
?>
</body>
</html>

The result of executing errorcontroloperator.php:

error control operator

Note: Operator @ is only work in the expression. For the simple order as if you take a value from something, you can add operator @ to its. For example, you earn enhancing it for the intake of variable, function, and include(), konstanta, etc. You cannot enhance it to the function of definition or class, or conditional structure of like and if of foreach, etc.



Series this article:
PHP Operators: Introduction
PHP Operators: Arithmetic Operators
PHP Operators: Assignment Operators
PHP Operators: Assignment Operators Table
PHP Operators: Bitwise Operators
PHP Operators: Relation Operators
PHP Operators: Ternary Operator
PHP Operators: Error Control Operator
PHP Operators: Execution Operator
PHP Operators: Increment or Decrement Operator
php Operators: Logic Operator
PHP Operators: String Operator
PHP Operators: Array Operator
PHP Operators: Object Operator
PHP Operators: Operator Priority
PHP Constants: Introduction

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting