ID: 42438 Updated by: [EMAIL PROTECTED] Reported By: perching_eagle at yahoo dot com Status: Open Bug Type: Scripting Engine problem Operating System: windows xp PHP Version: 5.2.3 New Comment:
Perhaps the reason it works for me is that I don't bother using Windows but a working OS instead. Linux. :) Previous Comments: ------------------------------------------------------------------------ [2007-08-28 00:41:16] perching_eagle at yahoo dot com i tried the new extension in your post and it didn't help. one question? did you try saving the two classes in seperate files? that is when the problem arises, i even notice that by importing dummy php files created similar results, the characters that are dumped on the screen looks a lot like japanese characters. ------------------------------------------------------------------------ [2007-08-27 08:43:52] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi I can't reproduce this. (I get the expected result..) ------------------------------------------------------------------------ [2007-08-27 08:41:46] perching_eagle at yahoo dot com actual output: surname=$name; } } ?>䘊瑡污攠牲牯汃獡⁳䘧瑡敨❲渠瑯映畯摮椠㩃䑜捯浵湥獴愠摮匠瑥楴杮屳潹業猠獯湡慹䑜獥瑫灯睜牯敢据屨桰⁰楦敬屳灾灨敤楳湧牥潟瑵異彴浴⹰桰⁰湯氠湩⁥ਲ਼ ------------------------------------------------------------------------ [2007-08-27 08:40:23] perching_eagle at yahoo dot com Description: ------------ the require, require_once, include, include_once operators produce unexpected results when used to import files in php v5.2.3, this problem didn't exist in the previous version i was using. two files contain two different classes that have a parent and child relationship. if both classes are on the same file, the scripting engine outputs the expected result. however, if they are kept in separate files and any of the four import operators are used, the scripting engine dumps jargons on the output screen. pls. try out the example before closing, suspending or the changing the status of this complaint to bogus. Bug #41855 is the same problem as this one, but someone rushed to conclusions without testing and proclaimed it bogus. Reproduce code: --------------- <?php // "parent.php" class Father{ public $surname; public function __construct($name){ $this->surname=$name; } } ?> //******************************************** //separate files //******************************************** <?php // "child.php" include_once("parent.php"); class Son extends Father{ public $name; public function __construct($first,$last){ parent::__construct($last); $this->name=$first; } } $boy=new Son("john","doe"); print $boy->name; print "<br>"; print $boy->surname; ?> Expected result: ---------------- john doe Actual result: -------------- surname=$name; } } ?>䘊瑡污攠牲牯汃獡⁳䘧瑡敨❲渠瑯映畯摮椠㩃䑜捯浵湥獴愠摮匠瑥楴杮屳潹業猠獯湡慹䑜獥瑫灯睜牯敢据屨桰⁰楦敬屳灾灨敤楳湧牥潟瑵異彴浴⹰桰⁰湯氠湩⁥ਲ਼ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42438&edit=1