You are here: Re: classes: strange behavior « PHP Programming Language « IT news, forums, messages
Re: classes: strange behavior

Posted by Paul Czubilinski on 05/07/06 14:58

Hi Chung,

I tried to simplify the problem as much as possible and it goes as
follow:

This works
========

class B { ... }
$a = new A();
class A extends B {...}

This doesn't work
==========

file A.php
-------------
include('B.php');
$a = new A();
class A extends B {....}

file B.php
------------
class B { ... }

================
I understand that in the second example A cannot be defined in the
compile mode because there is no B definition however during runtime
the first line includes B definition and I cannot find the reason it
cannot define A.

Paul

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация