Loading ...
Sorry, an error occurred while loading the content.

Re: [in-phpug] Re: Difference between isset() and empty() .

Expand Messages
  • R Sumathi
    Dear Sir I want to know how to and where and how it works error_reporting( E_ALL). regards R.Sumathi ... Did you know? You can CHAT without downloading
    Message 1 of 12 , Jun 1, 2007
    • 0 Attachment
      Dear Sir
      I want to know how to and where and how it works
      error_reporting( E_ALL).

      regards
      R.Sumathi



      --- UNAR <unar2002@...> wrote:

      > --- In in-phpug@yahoogroups.com, "Dr. Tarique Sani"
      > <tarique@...> wrote:
      > >
      > > Shadab Wadiwala wrote:
      > > > Hi !!
      > > >
      > > > I want to know what's the difference
      > between the functions
      > ----
      > > > isset() and empty()
      > > >
      > > Start by running the code below
      > > <?php
      > > error_reporting(E_ALL);
      > >
      > > echo isset($something);
      > > echo empty($something);
      > >
      > > ?>
      > >
      > > and let us know if you figure it out :)
      > >
      > > Cheers
      > > Tarique
      > >
      > > --
      > >
      >
      =============================================================
      > > PHP Applications for E-Biz:
      > http://www.sanisoft.com
      > >
      > > Coppermine Picture Gallery:
      > http://coppermine.sf.net
      > >
      >
      =============================================================
      > >
      > This is Difference between isset() and empty()
      > isset() isset()
      > determines whether a certain variable has already
      > been declared by PHP. It returns a boolean value
      > true if the variable has already been set, and
      > false otherwise, or if the variable is set to the
      > value
      > NULL .
      > Consider the following script:
      > if (isset($first_name)) {
      > print '$first_name is set';
      > }
      > This code snippet checks whether the variable
      > $first_name
      > is defined. If
      > $first_name
      > is defined,
      > isset()
      > returns
      > true
      > , which will display '
      > $first_name is
      > set.
      > ' If it isn't, no output is generated.
      > isset()
      > can also be used on array elements (discussed in a
      > later section)
      > and object properties. Here are examples for the
      > relevant syntax,
      > which you can refer to later:
      > ☞
      > Checking an array element:
      > if (isset($arr["offset"])) {
      > ...
      > }
      > ☞
      > Checking an object property:
      > if (isset($obj->property)) {
      > ...
      > }
      > Note that in both examples, we didn't check if
      > $arr
      > or
      > $obj
      > are set (before
      > we checked the offset or property, respectively).
      > The
      > isset()
      > construct returns
      > false
      > automatically if they are not set.
      > isset()
      > is the only one of the three language constructs
      > that accepts an
      > arbitrary amount of parameters. Its accurate
      > prototype is as follows:
      > isset($var1, $var2, $var3, ...);
      > It only returns
      > true
      > if all the variables have been defined; otherwise,
      > it
      > returns
      > false
      > . This is useful when you want to check if the
      > required input variables
      > for your script have really been sent by the client,
      > saving you a
      > series of single isset()checks.
      >
      > empty()
      > empty() empty() may be used to check if a variable
      > has not been
      > declared or its value is false. This language
      > construct is usually
      > used to check
      > if a form variable has not been sent or does not
      > contain data. When
      > checking a
      > variable's truth value, its value is first converted
      > to a Boolean
      > according to the
      > rules in the following section, and then it is
      > checked for true/false.
      > For example:
      > if (empty($name)) {
      > print 'Error: Forgot to specify a value for $name';
      > }
      > This code prints an error message if $name doesn't
      > contain a value that
      > evaluates to true.
      > Cheer Up
      > Illahi Bux
      >
      >



      Did you know? You can CHAT without downloading messenger. Click here http://in.messenger.yahoo.com/webmessengerpromo.php
    • Aji Issac
      Dear Sumathi, When the code encounter errors it throws the error message to the output screen. Errors can be of various types, like notice, warning and ERROR,
      Message 2 of 12 , Jun 1, 2007
      • 0 Attachment
        Dear Sumathi,

        When the code encounter errors it throws the error message to the output
        screen. Errors can be of various types, like notice, warning and ERROR, some
        are critical and some can be ignored (but it is advisable to take care of
        all errors but some open source application are difficult to run with E_ALL,
        thats is showing all errors).

        error_reporting(E_ALL ^ E_NOTICE); means show all errors except notices.
        When we run alpha,beta and production servers, we have

        error_reporting(0); for production as we do not want to show any error to
        the user but we catch it and send it to our programmers.

        error_reporting(E_ALL ^ E_NOTICE); for beta
        error_reporting(E_ALL) for alpha so that we can take care of all the errors.
        As I said sometimes it is not possible for open source (third party
        applications) as fixing these errors will create more problems with next
        updates.

        Thanks,
        Aji Issac
        --
        http://www.idealwebtools.com/blog/top/ - know your *nix server better with
        top command. This will help you understand more about its performance.


        On 6/2/07, R Sumathi <sumathi80in@...> wrote:
        >
        > Dear Sir
        > I want to know how to and where and how it works
        > error_reporting( E_ALL).
        >
        > regards
        > R.Sumathi
        >
        >
        > --- UNAR <unar2002@... <unar2002%40yahoo.com>> wrote:
        >
        > > --- In in-phpug@yahoogroups.com <in-phpug%40yahoogroups.com>, "Dr.
        > Tarique Sani"
        > > <tarique@...> wrote:
        > > >
        > > > Shadab Wadiwala wrote:
        > > > > Hi !!
        > > > >
        > > > > I want to know what's the difference
        > > between the functions
        > > ----
        > > > > isset() and empty()
        > > > >
        > > > Start by running the code below
        > > > <?php
        > > > error_reporting(E_ALL);
        > > >
        > > > echo isset($something);
        > > > echo empty($something);
        > > >
        > > > ?>
        > > >
        > > > and let us know if you figure it out :)
        > > >
        > > > Cheers
        > > > Tarique
        > > >
        > > > --
        > > >
        > >
        > =============================================================
        > > > PHP Applications for E-Biz:
        > > http://www.sanisoft.com
        > > >
        > > > Coppermine Picture Gallery:
        > > http://coppermine.sf.net
        > > >
        > >
        > =============================================================
        > > >
        > > This is Difference between isset() and empty()
        > > isset() isset()
        > > determines whether a certain variable has already
        > > been declared by PHP. It returns a boolean value
        > > true if the variable has already been set, and
        > > false otherwise, or if the variable is set to the
        > > value
        > > NULL .
        > > Consider the following script:
        > > if (isset($first_name)) {
        > > print '$first_name is set';
        > > }
        > > This code snippet checks whether the variable
        > > $first_name
        > > is defined. If
        > > $first_name
        > > is defined,
        > > isset()
        > > returns
        > > true
        > > , which will display '
        > > $first_name is
        > > set.
        > > ' If it isn't, no output is generated.
        > > isset()
        > > can also be used on array elements (discussed in a
        > > later section)
        > > and object properties. Here are examples for the
        > > relevant syntax,
        > > which you can refer to later:
        > > ☞
        > > Checking an array element:
        > > if (isset($arr["offset"])) {
        > > ...
        > > }
        > > ☞
        > > Checking an object property:
        > > if (isset($obj->property)) {
        > > ...
        > > }
        > > Note that in both examples, we didn't check if
        > > $arr
        > > or
        > > $obj
        > > are set (before
        > > we checked the offset or property, respectively).
        > > The
        > > isset()
        > > construct returns
        > > false
        > > automatically if they are not set.
        > > isset()
        > > is the only one of the three language constructs
        > > that accepts an
        > > arbitrary amount of parameters. Its accurate
        > > prototype is as follows:
        > > isset($var1, $var2, $var3, ...);
        > > It only returns
        > > true
        > > if all the variables have been defined; otherwise,
        > > it
        > > returns
        > > false
        > > . This is useful when you want to check if the
        > > required input variables
        > > for your script have really been sent by the client,
        > > saving you a
        > > series of single isset()checks.
        > >
        > > empty()
        > > empty() empty() may be used to check if a variable
        > > has not been
        > > declared or its value is false. This language
        > > construct is usually
        > > used to check
        > > if a form variable has not been sent or does not
        > > contain data. When
        > > checking a
        > > variable's truth value, its value is first converted
        > > to a Boolean
        > > according to the
        > > rules in the following section, and then it is
        > > checked for true/false.
        > > For example:
        > > if (empty($name)) {
        > > print 'Error: Forgot to specify a value for $name';
        > > }
        > > This code prints an error message if $name doesn't
        > > contain a value that
        > > evaluates to true.
        > > Cheer Up
        > > Illahi Bux
        > >
        > >
        >
        > Did you know? You can CHAT without downloading messenger. Click here
        > http://in.messenger.yahoo.com/webmessengerpromo.php
        >
        >
        >


        [Non-text portions of this message have been removed]
      • R Sumathi
        Dear sir, Thanks really in my project long list is showing ,can i know for which for E_ALL all are E_NOTICE thus it affects performance. ... === message
        Message 3 of 12 , Jun 2, 2007
        • 0 Attachment
          Dear sir,
          Thanks really in my project long list is showing ,can
          i know for which for E_ALL all are E_NOTICE thus it
          affects performance.





          --- Aji Issac <ajiissac@...> wrote:

          > Dear Sumathi,
          >
          > When the code encounter errors it throws the error
          > message to the output
          > screen. Errors can be of various types, like notice,
          > warning and ERROR, some
          > are critical and some can be ignored (but it is
          > advisable to take care of
          > all errors but some open source application are
          > difficult to run with E_ALL,
          > thats is showing all errors).
          >
          > error_reporting(E_ALL ^ E_NOTICE); means show all
          > errors except notices.
          > When we run alpha,beta and production servers, we
          > have
          >
          > error_reporting(0); for production as we do not want
          > to show any error to
          > the user but we catch it and send it to our
          > programmers.
          >
          > error_reporting(E_ALL ^ E_NOTICE); for beta
          > error_reporting(E_ALL) for alpha so that we can take
          > care of all the errors.
          > As I said sometimes it is not possible for open
          > source (third party
          > applications) as fixing these errors will create
          > more problems with next
          > updates.
          >
          > Thanks,
          > Aji Issac
          > --
          > http://www.idealwebtools.com/blog/top/ - know your
          > *nix server better with
          > top command. This will help you understand more
          > about its performance.
          >
          >
          > On 6/2/07, R Sumathi <sumathi80in@...>
          > wrote:
          > >
          > > Dear Sir
          > > I want to know how to and where and how it works
          > > error_reporting( E_ALL).
          > >
          > > regards
          > > R.Sumathi
          > >
          > >
          > > --- UNAR <unar2002@...
          > <unar2002%40yahoo.com>> wrote:
          > >
          > > > --- In in-phpug@yahoogroups.com
          > <in-phpug%40yahoogroups.com>, "Dr.
          > > Tarique Sani"
          > > > <tarique@...> wrote:
          > > > >
          > > > > Shadab Wadiwala wrote:
          > > > > > Hi !!
          > > > > >
          > > > > > I want to know what's the difference
          > > > between the functions
          > > > ----
          > > > > > isset() and empty()
          > > > > >
          > > > > Start by running the code below
          > > > > <?php
          > > > > error_reporting(E_ALL);
          > > > >
          > > > > echo isset($something);
          > > > > echo empty($something);
          > > > >
          > > > > ?>
          > > > >
          > > > > and let us know if you figure it out :)
          > > > >
          > > > > Cheers
          > > > > Tarique
          > > > >
          > > > > --
          > > > >
          > > >
          > >
          >
          =============================================================
          > > > > PHP Applications for E-Biz:
          > > > http://www.sanisoft.com
          > > > >
          > > > > Coppermine Picture Gallery:
          > > > http://coppermine.sf.net
          > > > >
          > > >
          > >
          >
          =============================================================
          > > > >
          > > > This is Difference between isset() and empty()
          > > > isset() isset()
          > > > determines whether a certain variable has
          > already
          > > > been declared by PHP. It returns a boolean value
          > > > true if the variable has already been set, and
          > > > false otherwise, or if the variable is set to
          > the
          > > > value
          > > > NULL .
          > > > Consider the following script:
          > > > if (isset($first_name)) {
          > > > print '$first_name is set';
          > > > }
          > > > This code snippet checks whether the variable
          > > > $first_name
          > > > is defined. If
          > > > $first_name
          > > > is defined,
          > > > isset()
          > > > returns
          > > > true
          > > > , which will display '
          > > > $first_name is
          > > > set.
          > > > ' If it isn't, no output is generated.
          > > > isset()
          > > > can also be used on array elements (discussed in
          > a
          > > > later section)
          > > > and object properties. Here are examples for the
          > > > relevant syntax,
          > > > which you can refer to later:
          > > > ☞
          > > > Checking an array element:
          > > > if (isset($arr["offset"])) {
          > > > ...
          > > > }
          > > > ☞
          > > > Checking an object property:
          > > > if (isset($obj->property)) {
          > > > ...
          > > > }
          > > > Note that in both examples, we didn't check if
          > > > $arr
          > > > or
          > > > $obj
          > > > are set (before
          > > > we checked the offset or property,
          > respectively).
          > > > The
          > > > isset()
          > > > construct returns
          > > > false
          > > > automatically if they are not set.
          > > > isset()
          > > > is the only one of the three language constructs
          > > > that accepts an
          > > > arbitrary amount of parameters. Its accurate
          > > > prototype is as follows:
          > > > isset($var1, $var2, $var3, ...);
          > > > It only returns
          > > > true
          > > > if all the variables have been defined;
          > otherwise,
          > > > it
          > > > returns
          > > > false
          > > > . This is useful when you want to check if the
          > > > required input variables
          > > > for your script have really been sent by the
          > client,
          > > > saving you a
          > > > series of single isset()checks.
          > > >
          > > > empty()
          > > > empty() empty() may be used to check if a
          > variable
          > > > has not been
          > > > declared or its value is false. This language
          > > > construct is usually
          > > > used to check
          > > > if a form variable has not been sent or does not
          > > > contain data. When
          > > > checking a
          > > > variable's truth value, its value is first
          > converted
          > > > to a Boolean
          > > > according to the
          > > > rules in the following section, and then it is
          > > > checked for true/false.
          > > > For example:
          > > > if (empty($name)) {
          > > > print 'Error: Forgot to specify a value for
          > $name';
          > > > }
          > > > This code prints an error message if $name
          > doesn't
          > > > contain a value that
          > > > evaluates to true.
          > > > Cheer Up
          > > > Illahi Bux
          > > >
          > > >
          > >
          >
          === message truncated ===




          __________________________________________________________
          Yahoo! India Answers: Share what you know. Learn something new
          http://in.answers.yahoo.com/
        • Aji Issac
          Sorry couldn t get you, can you please reframe your query. -- http://www.idealwebtools.com/blog/top/ - know your *nix server better with top command. This will
          Message 4 of 12 , Jun 2, 2007
          • 0 Attachment
            Sorry couldn't get you, can you please reframe your query.
            --
            http://www.idealwebtools.com/blog/top/ - know your *nix server better with
            top command. This will help you understand more about its performance.

            On 6/2/07, R Sumathi <sumathi80in@...> wrote:
            >
            > Dear sir,
            > Thanks really in my project long list is showing ,can
            > i know for which for E_ALL all are E_NOTICE thus it
            > affects performance.
            >
            >
            > --- Aji Issac <ajiissac@... <ajiissac%40gmail.com>> wrote:
            >
            > > Dear Sumathi,
            > >
            > > When the code encounter errors it throws the error
            > > message to the output
            > > screen. Errors can be of various types, like notice,
            > > warning and ERROR, some
            > > are critical and some can be ignored (but it is
            > > advisable to take care of
            > > all errors but some open source application are
            > > difficult to run with E_ALL,
            > > thats is showing all errors).
            > >
            > > error_reporting(E_ALL ^ E_NOTICE); means show all
            > > errors except notices.
            > > When we run alpha,beta and production servers, we
            > > have
            > >
            > > error_reporting(0); for production as we do not want
            > > to show any error to
            > > the user but we catch it and send it to our
            > > programmers.
            > >
            > > error_reporting(E_ALL ^ E_NOTICE); for beta
            > > error_reporting(E_ALL) for alpha so that we can take
            > > care of all the errors.
            > > As I said sometimes it is not possible for open
            > > source (third party
            > > applications) as fixing these errors will create
            > > more problems with next
            > > updates.
            > >
            > > Thanks,
            > > Aji Issac
            > > --
            > > http://www.idealwebtools.com/blog/top/ - know your
            > > *nix server better with
            > > top command. This will help you understand more
            > > about its performance.
            > >
            > >
            > > On 6/2/07, R Sumathi <sumathi80in@...<sumathi80in%40yahoo.co.in>
            > >
            > > wrote:
            > > >
            > > > Dear Sir
            > > > I want to know how to and where and how it works
            > > > error_reporting( E_ALL).
            > > >
            > > > regards
            > > > R.Sumathi
            > > >
            > > >
            > > > --- UNAR <unar2002@... <unar2002%40yahoo.com>
            > > <unar2002%40yahoo.com>> wrote:
            > > >
            > > > > --- In in-phpug@yahoogroups.com <in-phpug%40yahoogroups.com>
            > > <in-phpug%40yahoogroups.com>, "Dr.
            > > > Tarique Sani"
            > > > > <tarique@...> wrote:
            > > > > >
            > > > > > Shadab Wadiwala wrote:
            > > > > > > Hi !!
            > > > > > >
            > > > > > > I want to know what's the difference
            > > > > between the functions
            > > > > ----
            > > > > > > isset() and empty()
            > > > > > >
            > > > > > Start by running the code below
            > > > > > <?php
            > > > > > error_reporting(E_ALL);
            > > > > >
            > > > > > echo isset($something);
            > > > > > echo empty($something);
            > > > > >
            > > > > > ?>
            > > > > >
            > > > > > and let us know if you figure it out :)
            > > > > >
            > > > > > Cheers
            > > > > > Tarique
            > > > > >
            > > > > > --
            > > > > >
            > > > >
            > > >
            > >
            > =============================================================
            > > > > > PHP Applications for E-Biz:
            > > > > http://www.sanisoft.com
            > > > > >
            > > > > > Coppermine Picture Gallery:
            > > > > http://coppermine.sf.net
            > > > > >
            > > > >
            > > >
            > >
            > =============================================================
            > > > > >
            > > > > This is Difference between isset() and empty()
            > > > > isset() isset()
            > > > > determines whether a certain variable has
            > > already
            > > > > been declared by PHP. It returns a boolean value
            > > > > true if the variable has already been set, and
            > > > > false otherwise, or if the variable is set to
            > > the
            > > > > value
            > > > > NULL .
            > > > > Consider the following script:
            > > > > if (isset($first_name)) {
            > > > > print '$first_name is set';
            > > > > }
            > > > > This code snippet checks whether the variable
            > > > > $first_name
            > > > > is defined. If
            > > > > $first_name
            > > > > is defined,
            > > > > isset()
            > > > > returns
            > > > > true
            > > > > , which will display '
            > > > > $first_name is
            > > > > set.
            > > > > ' If it isn't, no output is generated.
            > > > > isset()
            > > > > can also be used on array elements (discussed in
            > > a
            > > > > later section)
            > > > > and object properties. Here are examples for the
            > > > > relevant syntax,
            > > > > which you can refer to later:
            > > > > ☞
            > > > > Checking an array element:
            > > > > if (isset($arr["offset"])) {
            > > > > ...
            > > > > }
            > > > > ☞
            > > > > Checking an object property:
            > > > > if (isset($obj->property)) {
            > > > > ...
            > > > > }
            > > > > Note that in both examples, we didn't check if
            > > > > $arr
            > > > > or
            > > > > $obj
            > > > > are set (before
            > > > > we checked the offset or property,
            > > respectively).
            > > > > The
            > > > > isset()
            > > > > construct returns
            > > > > false
            > > > > automatically if they are not set.
            > > > > isset()
            > > > > is the only one of the three language constructs
            > > > > that accepts an
            > > > > arbitrary amount of parameters. Its accurate
            > > > > prototype is as follows:
            > > > > isset($var1, $var2, $var3, ...);
            > > > > It only returns
            > > > > true
            > > > > if all the variables have been defined;
            > > otherwise,
            > > > > it
            > > > > returns
            > > > > false
            > > > > . This is useful when you want to check if the
            > > > > required input variables
            > > > > for your script have really been sent by the
            > > client,
            > > > > saving you a
            > > > > series of single isset()checks.
            > > > >
            > > > > empty()
            > > > > empty() empty() may be used to check if a
            > > variable
            > > > > has not been
            > > > > declared or its value is false. This language
            > > > > construct is usually
            > > > > used to check
            > > > > if a form variable has not been sent or does not
            > > > > contain data. When
            > > > > checking a
            > > > > variable's truth value, its value is first
            > > converted
            > > > > to a Boolean
            > > > > according to the
            > > > > rules in the following section, and then it is
            > > > > checked for true/false.
            > > > > For example:
            > > > > if (empty($name)) {
            > > > > print 'Error: Forgot to specify a value for
            > > $name';
            > > > > }
            > > > > This code prints an error message if $name
            > > doesn't
            > > > > contain a value that
            > > > > evaluates to true.
            > > > > Cheer Up
            > > > > Illahi Bux
            > > > >
            > > > >
            > > >
            > >
            > === message truncated ===
            >
            >
            > __________________________________________________________
            > Yahoo! India Answers: Share what you know. Learn something new
            > http://in.answers.yahoo.com/
            >
            >
            >


            [Non-text portions of this message have been removed]
          • R Sumathi
            sir, if i put error_reporting( E_ALL); I am getting more list. if i put error_reporting( E_ALL ^ E_NOTICE); except E_Notice i dont get any error list. That
            Message 5 of 12 , Jun 7, 2007
            • 0 Attachment
              sir,
              if i put error_reporting( E_ALL);
              I am getting more list.
              if i put error_reporting( E_ALL ^ E_NOTICE);
              except E_Notice i dont get any error list.
              That means i am getting E_Notice errors
              if it affects my performance.


              --- Aji Issac <ajiissac@...> wrote:

              > Sorry couldn't get you, can you please reframe your
              > query.
              > --
              > http://www.idealwebtools.com/blog/top/ - know your
              > *nix server better with
              > top command. This will help you understand more
              > about its performance.
              >
              > On 6/2/07, R Sumathi <sumathi80in@...>
              > wrote:
              > >
              > > Dear sir,
              > > Thanks really in my project long list is showing
              > ,can
              > > i know for which for E_ALL all are E_NOTICE thus
              > it
              > > affects performance.
              > >
              > >
              > > --- Aji Issac <ajiissac@...
              > <ajiissac%40gmail.com>> wrote:
              > >
              > > > Dear Sumathi,
              > > >
              > > > When the code encounter errors it throws the
              > error
              > > > message to the output
              > > > screen. Errors can be of various types, like
              > notice,
              > > > warning and ERROR, some
              > > > are critical and some can be ignored (but it is
              > > > advisable to take care of
              > > > all errors but some open source application are
              > > > difficult to run with E_ALL,
              > > > thats is showing all errors).
              > > >
              > > > error_reporting(E_ALL ^ E_NOTICE); means show
              > all
              > > > errors except notices.
              > > > When we run alpha,beta and production servers,
              > we
              > > > have
              > > >
              > > > error_reporting(0); for production as we do not
              > want
              > > > to show any error to
              > > > the user but we catch it and send it to our
              > > > programmers.
              > > >
              > > > error_reporting(E_ALL ^ E_NOTICE); for beta
              > > > error_reporting(E_ALL) for alpha so that we can
              > take
              > > > care of all the errors.
              > > > As I said sometimes it is not possible for open
              > > > source (third party
              > > > applications) as fixing these errors will create
              > > > more problems with next
              > > > updates.
              > > >
              > > > Thanks,
              > > > Aji Issac
              > > > --
              > > > http://www.idealwebtools.com/blog/top/ - know
              > your
              > > > *nix server better with
              > > > top command. This will help you understand more
              > > > about its performance.
              > > >
              > > >
              > > > On 6/2/07, R Sumathi
              > <sumathi80in@...<sumathi80in%40yahoo.co.in>
              > > >
              > > > wrote:
              > > > >
              > > > > Dear Sir
              > > > > I want to know how to and where and how it
              > works
              > > > > error_reporting( E_ALL).
              > > > >
              > > > > regards
              > > > > R.Sumathi
              > > > >
              > > > >
              > > > > --- UNAR <unar2002@...
              > <unar2002%40yahoo.com>
              > > > <unar2002%40yahoo.com>> wrote:
              > > > >
              > > > > > --- In in-phpug@yahoogroups.com
              > <in-phpug%40yahoogroups.com>
              > > > <in-phpug%40yahoogroups.com>, "Dr.
              > > > > Tarique Sani"
              > > > > > <tarique@...> wrote:
              > > > > > >
              > > > > > > Shadab Wadiwala wrote:
              > > > > > > > Hi !!
              > > > > > > >
              > > > > > > > I want to know what's the difference
              > > > > > between the functions
              > > > > > ----
              > > > > > > > isset() and empty()
              > > > > > > >
              > > > > > > Start by running the code below
              > > > > > > <?php
              > > > > > > error_reporting(E_ALL);
              > > > > > >
              > > > > > > echo isset($something);
              > > > > > > echo empty($something);
              > > > > > >
              > > > > > > ?>
              > > > > > >
              > > > > > > and let us know if you figure it out :)
              > > > > > >
              > > > > > > Cheers
              > > > > > > Tarique
              > > > > > >
              > > > > > > --
              > > > > > >
              > > > > >
              > > > >
              > > >
              > >
              >
              =============================================================
              > > > > > > PHP Applications for E-Biz:
              > > > > > http://www.sanisoft.com
              > > > > > >
              > > > > > > Coppermine Picture Gallery:
              > > > > > http://coppermine.sf.net
              > > > > > >
              > > > > >
              > > > >
              > > >
              > >
              >
              =============================================================
              > > > > > >
              > > > > > This is Difference between isset() and
              > empty()
              > > > > > isset() isset()
              > > > > > determines whether a certain variable has
              > > > already
              > > > > > been declared by PHP. It returns a boolean
              > value
              > > > > > true if the variable has already been set,
              > and
              > > > > > false otherwise, or if the variable is set
              > to
              > > > the
              > > > > > value
              > > > > > NULL .
              > > > > > Consider the following script:
              > > > > > if (isset($first_name)) {
              > > > > > print '$first_name is set';
              > > > > > }
              > > > > > This code snippet checks whether the
              > variable
              > > > > > $first_name
              > > > > > is defined. If
              > > > > > $first_name
              > > > > > is defined,
              > > > > > isset()
              > > > > > returns
              > > > > > true
              > > > > > , which will display '
              > > > > > $first_name is
              > > > > > set.
              > > > > > ' If it isn't, no output is generated.
              > > > > > isset()
              > > > > > can also be used on array elements
              > (discussed in
              > > > a
              > > > > > later section)
              > > > > > and object properties. Here are examples for
              > the
              > > > > > relevant syntax,
              > > > > > which you can refer to later:
              > > > > > ☞
              > > > > > Checking an array element:
              > > > > > if (isset($arr["offset"])) {
              > > > > > ...
              > > > > > }
              > > > > > ☞
              > > > > > Checking an object property:
              > > > > > if (isset($obj->property)) {
              > > > > > ...
              > > > > > }
              > > > > > Note that in both examples, we didn't check
              > if
              > > > > > $arr
              > > > > > or
              > > > > > $obj
              > > > > > are set (before
              > > > > > we checked the offset or property,
              > > > respectively).
              > > > > > The
              > > > > > isset()
              > > > > > construct returns
              > > > > > false
              > > > > > automatically if they are not set.
              > > > > > isset()
              > > > > > is the only one of the three language
              > constructs
              > > > > > that accepts an
              >
              === message truncated ===



              Did you know? You can CHAT without downloading messenger. Click here http://in.messenger.yahoo.com/webmessengerpromo.php
            • Aji Issac
              You will have to do a little more explanation as I am not able to understand your query, sorry. http://www.idealwebtools.com/blog/top/ - know your *nix server
              Message 6 of 12 , Jun 7, 2007
              • 0 Attachment
                You will have to do a little more explanation as I am not able to understand
                your query, sorry.

                http://www.idealwebtools.com/blog/top/ - know your *nix server better with
                top command. This will help you understand more about its performance.

                On 6/8/07, R Sumathi <sumathi80in@...> wrote:
                >
                > sir,
                > if i put error_reporting( E_ALL);
                > I am getting more list.
                > if i put error_reporting( E_ALL ^ E_NOTICE);
                > except E_Notice i dont get any error list.
                > That means i am getting E_Notice errors
                > if it affects my performance.
                >
                > --- Aji Issac <ajiissac@... <ajiissac%40gmail.com>> wrote:
                >
                > > Sorry couldn't get you, can you please reframe your
                > > query.
                > > --
                > > http://www.idealwebtools.com/blog/top/ - know your
                > > *nix server better with
                > > top command. This will help you understand more
                > > about its performance.
                > >
                > > On 6/2/07, R Sumathi <sumathi80in@...<sumathi80in%40yahoo.co.in>
                > >
                > > wrote:
                > > >
                > > > Dear sir,
                > > > Thanks really in my project long list is showing
                > > ,can
                > > > i know for which for E_ALL all are E_NOTICE thus
                > > it
                > > > affects performance.
                > > >
                > > >
                > > > --- Aji Issac <ajiissac@... <ajiissac%40gmail.com>
                > > <ajiissac%40gmail.com>> wrote:
                > > >
                > > > > Dear Sumathi,
                > > > >
                > > > > When the code encounter errors it throws the
                > > error
                > > > > message to the output
                > > > > screen. Errors can be of various types, like
                > > notice,
                > > > > warning and ERROR, some
                > > > > are critical and some can be ignored (but it is
                > > > > advisable to take care of
                > > > > all errors but some open source application are
                > > > > difficult to run with E_ALL,
                > > > > thats is showing all errors).
                > > > >
                > > > > error_reporting(E_ALL ^ E_NOTICE); means show
                > > all
                > > > > errors except notices.
                > > > > When we run alpha,beta and production servers,
                > > we
                > > > > have
                > > > >
                > > > > error_reporting(0); for production as we do not
                > > want
                > > > > to show any error to
                > > > > the user but we catch it and send it to our
                > > > > programmers.
                > > > >
                > > > > error_reporting(E_ALL ^ E_NOTICE); for beta
                > > > > error_reporting(E_ALL) for alpha so that we can
                > > take
                > > > > care of all the errors.
                > > > > As I said sometimes it is not possible for open
                > > > > source (third party
                > > > > applications) as fixing these errors will create
                > > > > more problems with next
                > > > > updates.
                > > > >
                > > > > Thanks,
                > > > > Aji Issac
                > > > > --
                > > > > http://www.idealwebtools.com/blog/top/ - know
                > > your
                > > > > *nix server better with
                > > > > top command. This will help you understand more
                > > > > about its performance.
                > > > >
                > > > >
                > > > > On 6/2/07, R Sumathi
                > > <sumathi80in@... <sumathi80in%40yahoo.co.in><sumathi80in%
                > 40yahoo.co.in>
                > > > >
                > > > > wrote:
                > > > > >
                > > > > > Dear Sir
                > > > > > I want to know how to and where and how it
                > > works
                > > > > > error_reporting( E_ALL).
                > > > > >
                > > > > > regards
                > > > > > R.Sumathi
                > > > > >
                > > > > >
                > > > > > --- UNAR <unar2002@... <unar2002%40yahoo.com>
                > > <unar2002%40yahoo.com>
                > > > > <unar2002%40yahoo.com>> wrote:
                > > > > >
                > > > > > > --- In in-phpug@yahoogroups.com <in-phpug%40yahoogroups.com>
                > > <in-phpug%40yahoogroups.com>
                > > > > <in-phpug%40yahoogroups.com>, "Dr.
                > > > > > Tarique Sani"
                > > > > > > <tarique@...> wrote:
                > > > > > > >
                > > > > > > > Shadab Wadiwala wrote:
                > > > > > > > > Hi !!
                > > > > > > > >
                > > > > > > > > I want to know what's the difference
                > > > > > > between the functions
                > > > > > > ----
                > > > > > > > > isset() and empty()
                > > > > > > > >
                > > > > > > > Start by running the code below
                > > > > > > > <?php
                > > > > > > > error_reporting(E_ALL);
                > > > > > > >
                > > > > > > > echo isset($something);
                > > > > > > > echo empty($something);
                > > > > > > >
                > > > > > > > ?>
                > > > > > > >
                > > > > > > > and let us know if you figure it out :)
                > > > > > > >
                > > > > > > > Cheers
                > > > > > > > Tarique
                > > > > > > >
                > > > > > > > --
                > > > > > > >
                > > > > > >
                > > > > >
                > > > >
                > > >
                > >
                > =============================================================
                > > > > > > > PHP Applications for E-Biz:
                > > > > > > http://www.sanisoft.com
                > > > > > > >
                > > > > > > > Coppermine Picture Gallery:
                > > > > > > http://coppermine.sf.net
                > > > > > > >
                > > > > > >
                > > > > >
                > > > >
                > > >
                > >
                > =============================================================
                > > > > > > >
                > > > > > > This is Difference between isset() and
                > > empty()
                > > > > > > isset() isset()
                > > > > > > determines whether a certain variable has
                > > > > already
                > > > > > > been declared by PHP. It returns a boolean
                > > value
                > > > > > > true if the variable has already been set,
                > > and
                > > > > > > false otherwise, or if the variable is set
                > > to
                > > > > the
                > > > > > > value
                > > > > > > NULL .
                > > > > > > Consider the following script:
                > > > > > > if (isset($first_name)) {
                > > > > > > print '$first_name is set';
                > > > > > > }
                > > > > > > This code snippet checks whether the
                > > variable
                > > > > > > $first_name
                > > > > > > is defined. If
                > > > > > > $first_name
                > > > > > > is defined,
                > > > > > > isset()
                > > > > > > returns
                > > > > > > true
                > > > > > > , which will display '
                > > > > > > $first_name is
                > > > > > > set.
                > > > > > > ' If it isn't, no output is generated.
                > > > > > > isset()
                > > > > > > can also be used on array elements
                > > (discussed in
                > > > > a
                > > > > > > later section)
                > > > > > > and object properties. Here are examples for
                > > the
                > > > > > > relevant syntax,
                > > > > > > which you can refer to later:
                > > > > > > ☞
                > > > > > > Checking an array element:
                > > > > > > if (isset($arr["offset"])) {
                > > > > > > ...
                > > > > > > }
                > > > > > > ☞
                > > > > > > Checking an object property:
                > > > > > > if (isset($obj->property)) {
                > > > > > > ...
                > > > > > > }
                > > > > > > Note that in both examples, we didn't check
                > > if
                > > > > > > $arr
                > > > > > > or
                > > > > > > $obj
                > > > > > > are set (before
                > > > > > > we checked the offset or property,
                > > > > respectively).
                > > > > > > The
                > > > > > > isset()
                > > > > > > construct returns
                > > > > > > false
                > > > > > > automatically if they are not set.
                > > > > > > isset()
                > > > > > > is the only one of the three language
                > > constructs
                > > > > > > that accepts an
                > >
                > === message truncated ===
                >
                > Did you know? You can CHAT without downloading messenger. Click here
                > http://in.messenger.yahoo.com/webmessengerpromo.php
                >
                >
                >



                --
                http://www.idealwebtools.com/blog/ - My blog


                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.