Re: [PHP-DEV] Re: exit() / die()

2001-09-29 Thread Sander Steffann

 I'm glad I read the list.  Doing (a) will break several scripts that my
site
 depends on.

Ok, I was mistaken in thinking it wouldn't break (a lot of) existing code.

 Zeev Suraski [EMAIL PROTECTED] wrote in message
 news:5.1.0.14.2.20010929020430.051aa2a8@localhost...
  Guys,
 
  Changing these is quite out of the question - they've been a core part
of
  the language since 1997 (at least), and have lots of lines of code that
  rely on them.  Moreover, there's no clear-cut reason to change it,
  especially considering it only makes sense when used in command-line
mode,
  whereas the current behavior is useful in all SAPIs (in order to
introduce
  such a compatibility-breaking change, we need a *good* reason).

You are right. I have been doing some command-line work lately, and I was
surprised that exit() didn't do what I expected. But PHP is still (mostly) a
web-server language, and there it would make no sense indeed.

Changing my vote to -1 on changing and +1 on introducing a new function :)
Sander.




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] MySQL_Num_Rows functionality

2001-09-29 Thread Mike Rogers


mysql_num_rows() to a result that returned zero rows returns 'Supplied
argument is not a valid MySQL result resource'.  If it is an invalid
resource (such as SELECT * from table to an empty table), shouldn't it
return ZERO (0).

That seems to make the most sense, as opposed to throwing an error.  if
(mysql_num_rows($result) != 0) seems to be useful, but it doesn't work
because of this.

I realize I can put an @' symbol, but i just think it should return zero.
--
Mike


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Öйú²ÅÍø֪ͨ

2001-09-29 Thread °Ù´óÍøÍø¹Ü
Title: °Ù´óÍø/Óʼþ





 
  
 
   

  
   

  

 
   

  
   

  

 
   
¡¡¹úÄÚΨһµÄÒ»¸öԺУÈ˲ÅÍøÕ¾Á¬Ëøƽ̨ 
  Badajob.com 
  ÎʺòÄú
  

 
   

  

 
   

  
  ¿´¿´ÄÄÏîÑ¡ÔñÊʺÏÄú
:

 
  Ó®ÊÖ»ú£ºÈç¹ûÄúÊÇһλÔÚУ´ó¡¢ÖÐרѧÉú£¬ÇëÄúʹÓÃbadajobµÄÍøÕ¾Éú³ÉÆ÷
£¬»¨Ò»µãʱ¼äΪÄú

 
  µÄĸ
УÉú³ÉÒ»¸öÈ˲ÅÍøÕ¾£¬½±Æ·ÃûÅÆÊÖ»úµÈ×ÅÄú


 
  

 
  Ôº¡¡Ð££ºÖ»Ð軨
Îå·ÖÖÓ£¬¼´¿ÉÔÚbadajobƽ̨ÉÏÉú³ÉÒ»¸ö¹¦ÄÜÇ¿´óʵÓõı¾Ð£È˲ÅÍøÕ¾£¬10ÔÂ


 
  µ×
Ç°Õýʽ¼ÓÃË£¬
ÔùÕÆÉϵçÄÔ

 
  

 
  ׬¡¡Ç®£ºÄêÕõ500ÍòµÄÊÂÒµ»ú»á! 
badajobµÄ´óÐÍԺУÈ˲ÅÍøÕ¾Éú³ÉÆ÷Èí¼þ³ÏÕ÷Ê¡¼¶¡¢µØÊм¶´ú


 
  ÀíÉÌ

 
  

 
  Çó¡¡Ö°£ºÁôÏÂÄúµÄ¼òÀú£¬´ø×ßÄúµÄºÃ¹¤×÷¡£ÏÈ
ÓÃword×¼±¸ºÃÒ»·Ý¸öÐÔ»¯µÄÍêÕûµÄÇóÖ°¼òÀúÌù¡¡

 
  
µ½badajob.com¡£ÈÃ1000¸öÍøվͬʱΪÄã·þÎñ¿´¿´ÄÄЩºÃ¹«Ë¾ÕÐÈË...

 
  

 
  Ç󡡲ţºÔÚbadajobÁªÃ˵ÄÈκÎÒ»¸öÍøÕ¾ÉÏ·¢²¼ÕÐƸÐÅÏ¢£¬½«±»³É°ÙÉÏǧ¸öÍøÕ¾µÄ·ÃÎÊÕß¼ìÔÄ

 
  
ÆعâÁ¿Ç°ËùδÓÐ 
 
 
 
 
 
 
 
 


 
   
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
    
  
 
  
 
  
 
  
 
  ¡¡
ÍƼö¸øÅóÓÑ
  


  

  
  





-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP-DEV] why does exit() print its argument?

2001-09-29 Thread Yasuo Ohgaki

Markus Fischer wrote:
Usualy I am very much against breaking backwards compatibility, but in this
case I think it's the best thing to do... Because:
- It's already documented that way
- It's the 'expected' behaviour (from other languages, and from the docs)

As Rasmus said: It would be surprising if this broke a lot of (or even any)
code.

 
 +1
 
 Hey, my second vote O_o

-1 for PHP 4.0.x
+1 for PHP 4.1 or greater.




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] MySQL_Num_Rows functionality

2001-09-29 Thread Mike Rogers

Ignore.
This only happened for a few minutes and without changing anything
started working.  I don't know why.
--
Mike

- Original Message -
From: Mike Rogers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 30, 2001 12:48 AM
Subject: [PHP-DEV] MySQL_Num_Rows functionality



 mysql_num_rows() to a result that returned zero rows returns 'Supplied
 argument is not a valid MySQL result resource'.  If it is an invalid
 resource (such as SELECT * from table to an empty table), shouldn't it
 return ZERO (0).

 That seems to make the most sense, as opposed to throwing an error.
if
 (mysql_num_rows($result) != 0) seems to be useful, but it doesn't work
 because of this.

 I realize I can put an @' symbol, but i just think it should return zero.
 --
 Mike


 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] exit() and discussion

2001-09-29 Thread Markus Fischer

Zeev,

You are right that there is no immidiate reason for changing
exit() right now to behave as expected.

However, I think most have to admit that its a bad story[tm] that
exit() evolved to it what it is right now. As you see many people
expect exit() to behave like its C counterpart; and, there is
nothing wrong assuming so.

Adding just another funciton to retain BC would look like PHPs
evolving is steered depending on solar irradiation. I think after
all people want a strong language thats well thougt and makes
sense (not by loosing its easy of usability) and not adding 'just
another function to have BC'.


I don't think I can convience anyone with this mail (especially
not you ;). Anyway, I'ld like to see behaving exit() in the
future like expecting: no ouput and return code.

For doing a smooth transient the 'magic' thing isn't such a bad
idea. Additionally, in further versions, we could also throw a
warning at the user that the miss-use of this function is
deprecated and he really wants die() so we could nuke the
magic behaviour when we think the time is right to really break
things but then it is already a time where people should now that
they are using the wrong function anyway.

- Markus (the small voice in your head)

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]