ID:          24637
 Updated by:  [EMAIL PROTECTED]
 Reported By: Bertrand dot Willm at laposte dot net
 Status:      Open
 Bug Type:    Class/Object related
 PHP Version: 5.0.0b1 (beta1)
 New Comment:

-r is only available in CLI and there you do not need '<?php ?>' also
when you use '<? ?>' this has to be enabled by ini settings.

Anyway. At the moment constructors/destructors are inherited as
functions only and not as constructors/destructors. I guess the usual
suspects have to discuss that a bit :-)

Thanks for notifying


Previous Comments:
------------------------------------------------------------------------

[2003-07-22 12:47:58] Bertrand dot Willm at laposte dot net

On PHP 5.0.0b2-dev (cgi-fcgi) (built: Jul 14 2003 20:08:40)
there is no -r option.
I try this:
php -n
and on the standard input:
<? class t { function __destruct() { echo "Bla\n";} } $o= new t; ?>
This should be equivalent. It works.
What does not work is the following:
php -n -r '<? class t { function __destruct() { echo "Bla\n";} } class
u extends t {} $o= new u; ?>'
As there is no -r on my php I enterred this:
php -n
and in the standard input:
<? class t { function __destruct() { echo "Bla\n";} } class u extends t
{} $o= new u; ?>
This does not work.

------------------------------------------------------------------------

[2003-07-16 02:52:32] [EMAIL PROTECTED]

Try this simple CLI command:
php -n -r 'class t { function __destruct() { echo "Bla\n";} } $o= new
t;'

For me it outputs Bla what means the destructor is called during
shutdown. However it is possible that one of my pending patches causes
the correct behavior. Please verify again.

------------------------------------------------------------------------

[2003-07-16 01:04:22] Bertrand dot Willm at laposte dot net

I did not see any difference with this new release.

------------------------------------------------------------------------

[2003-07-14 15:29:40] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2003-07-14 15:24:40] Bertrand dot Willm at laposte dot net

I probably make an error entering the bug.
What should be read is:

Actual result:
--------------
Creation of ExtObject
ExtObject->CBaseClass::__construct()
End of script

Expected result:
----------------
Creation of ExtObject
ExtObject->CBaseClass::__construct()
End of script
ExtObject->CBaseClass::__destruct()

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/24637

-- 
Edit this bug report at http://bugs.php.net/?id=24637&edit=1

Reply via email to