Page 1 of 1

Strange behavior of function die()

Posted: Thu Apr 01, 2010 12:54 pm
by alkz
I'm developing a PHP application that use MySQL and I wrote a class that contains the methods to access, write and read in the db.
In these methods I use the function die() if something went wrong but I cannot understand why I cannot see the string that I've gave to the function, I only see a white screen.
A more strange fact is that if I don't declare the class and I use the singles functions, the string in die is correctly visualized, I really cannot understand.

Re: Strange behavior of function die()

Posted: Thu Apr 01, 2010 1:01 pm
by AbraCadaver
Most likely you have a parse error in the class and you don't have error reporting setup correctly.

Re: Strange behavior of function die()

Posted: Fri Apr 02, 2010 3:29 pm
by tr0gd0rr
Also keep in mind that `die()` will not accept numbers and that `die()` outputs `null` and `false` as empty strings. You may want to do a `var_dump()` then `die()` so you can differentiate numbers, null, false and empty strings.