#33925 [Csd->Bgs]: __construct() cause __destruct() call

From: Date: Mon, 01 Aug 2005 07:47:31 +0000
Subject: #33925 [Csd->Bgs]: __construct() cause __destruct() call
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82749@lists.php.net to get a copy of this message
ID: 33925 Updated by: tony2001@php.net Reported By: deadman_great at mail dot ru -Status: Closed +Status: Bogus Bug Type: Class/Object related Operating System: RH Redora, core 2 PHP Version: 5.0.4 Previous Comments: ------------------------------------------------------------------------ [2005-07-29 22:01:22] deadman_great at mail dot ru Sorry. Bug magically disappear. ------------------------------------------------------------------------ [2005-07-29 21:56:17] deadman_great at mail dot ru Description: ------------ Destructor called after constructor. My configure string: ./configure --prefix=/usr/local --with-apache2=../httpd-2.0.53 --with-apxs2=/usr/local/apache2/bin/apxs --with-mod_charset --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --with-zlib --enable-memory-limit --enable-exif --with-ttf --enable-gd-native-ttf --with-openssl=/usr/local --with-iconv --with-curl=/usr/local --enable-ftp --enable-sockets --enable-maintainer-zts Reproduce code: --------------- <? class Engine { function __construct () { echo '[CONSTRUCTOR]'; } function __destruct () { echo '[DESTRUCTOR]'; } } echo '[BEFORE]'; $egn = new Engine(); echo '[AFTER]'; ?> Expected result: ---------------- [BEFORE][CONSTRUCTOR][AFTER][DESTRUCTOR] Actual result: -------------- [BEFORE][CONSTRUCTOR][DESTRUCTOR][AFTER][DESTRUCTOR] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33925&edit=1

« previous php.bugs (#82749) next »