Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6792 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25891 invoked by uid 1010); 5 Jan 2004 14:37:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25824 invoked from network); 5 Jan 2004 14:37:12 -0000 Received: from unknown (HELO shiva.mind.de) (212.42.230.204) by pb1.pair.com with SMTP; 5 Jan 2004 14:37:12 -0000 Received: from [192.168.1.100] (p508EAA23.dip.t-dialin.net [80.142.170.35]) by shiva.mind.de (Postfix) with ESMTP id 00F9697B64 for ; Mon, 5 Jan 2004 15:37:11 +0100 (CET) Date: Mon, 5 Jan 2004 15:37:53 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <171226737484.20040105153753@marcus-boerger.de> To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Conditional class definition in PHP 4.3.x From: helly@php.net (Marcus Boerger) Hello internals, version 5 does neither support nested classes nor conditional classes. Not supporting the former is a bit of a loss but the latter leads to ugly software design so no worry here. Anyway i tried the test script with 4.3.5-dev and there conditional classes are present but not working. Hence i suggest we disable or fix them. Further more i think we cannot fix it becasue the script mixes compile time and run time. It tries something like selfmodifying code. Since i think it is ugly software design anyways i am pro disabling. marcus@zaphod /usr/src/PHP_4_3_0 $ php -r 'if (1) {class a{function f(){return 1;}}}else{class a{function f(){return 0;}}}echo a::f()."\n";' 0 marcus@zaphod /usr/src/PHP_4_3_0 $ php -r 'if (0) {class a{function f(){return 1;}}}else{class a{function f(){return 0;}}}echo a::f()."\n";' 0 -- Best regards, Marcus mailto:helly@php.net