|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-15 09:12 UTC] helly@php.net
[2004-07-15 18:25 UTC] wez@php.net
[2004-07-25 21:10 UTC] helly@php.net
[2004-08-03 01:00 UTC] php-bugs at lists dot php dot net
[2007-07-30 09:32 UTC] hans dot duedal at gmail dot com
[2007-07-30 09:53 UTC] hans dot duedal at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
Description: ------------ When I run the attached code on my machine, it creates a file called testing.txt in the directory where the php-file was located, containing the line "Constructor". And another file in the apache servers root directory also called testing.txt, containing the line "Destructor". Reproduce code: --------------- <? class BugTest { function __construct() { $fp = fopen("testing.txt", "a"); fwrite($fp, "Constructor\n"); fclose($fp); } function __destruct() { $fp = fopen("testing.txt", "a"); fwrite($fp, "Destructor\n"); fclose($fp); } } $bugtest = new BugTest(); ?> Expected result: ---------------- A single file containing the two lines: Constructor Destructor