NYCPHP Meetup

NYPHP.org

[nycphp-talk] return, isset and is this a PHP 4.3.2 bug?

Phil Powell phillip.powell at adnet-sys.com
Wed Feb 25 12:34:48 EST 2004


[PHP]
class MyClass {
 
 var $isSQLFieldArray = array();

 function MyClass() {}
 
 function getISSQLFieldArray($field) {
  if ($field) return $this->isSQLFieldArray[$field];
 }

}
[/PHP]

If I use this exact class and method in my script, the page that calls 
it locks up.  Even using [PHP]error_reporting(E_ALL);[/PHP] not only 
produces NOT ONE ERROR/WARNING/ANYTHING, the page STILL locks up cold!! 
You can't click onto a link or press a form button and go ANYWHERE AT ALL...

However, if I do this:

[PHP]
class MyClass {

 var $isSQLFieldArray = array();

 function MyClass() {}

 function getIsSQLFieldArray($field) {
  if ($field && isset($this->isSQLFieldArray[$field])) return 
$this->isSQLFieldArray[$field];
 }

}
[/PHP]

Everything works just fine and STILL no errors reported by 
[PHP]error_reporting(E_ALL);[/PHP]

What do you all make of this one?  The following URLs provided me no 
information:

http://us4.php.net/isset
http://us4.php.net/return

Phil

-- 
Phil Powell
Web Developer
  ADNET Systems, Inc.
  11260 Roger Bacon Drive, Suite 403
  Reston, VA  20190-5203
Phone: (703) 709-7218 x107   Cell: (571) 437-4430   FAX: (703) 709-7219
EMail:  Phillip.Powell at adnet-sys.com      AOL IM: SOA Dude







More information about the talk mailing list