Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6796 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5925 invoked by uid 1010); 5 Jan 2004 16:22:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5900 invoked from network); 5 Jan 2004 16:22:12 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 5 Jan 2004 16:22:12 -0000 Received: (qmail 19401 invoked from network); 5 Jan 2004 16:22:10 -0000 Received: from guardian.zend.office (HELO andi-laptop.zend.com) (10.1.1.4) by int.zend.com with SMTP; 5 Jan 2004 16:22:10 -0000 Message-ID: <5.1.0.14.2.20040105182136.051e62b0@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 05 Jan 2004 18:22:04 +0200 To: Marcus Boerger ,internals@lists.php.net In-Reply-To: <171226737484.20040105153753@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Conditional class definition in PHP 4.3.x From: andi@zend.com (Andi Gutmans) References: <171226737484.20040105153753@marcus-boerger.de> This is strange. I remember it used to work. We'll look into it. Andi At 03:37 PM 1/5/2004 +0100, Marcus Boerger wrote: >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 > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php