我有一个关于在PHP中扩展类的问题。我在php网站上看到的例子,方法里只有1行代码……如果方法里有很多代码,是不是一样??如果这是基类:classBaseClass{publicfunctionWithWayTooMuchCode{//like100linesofcodehere}}如果我想使用相同的方法,但只更改一两处,是否必须复制所有代码?classMyOwnClassextendsBaseClass{publicfunctionWithWayTooMuchCode{//like100linesofcodehere//doIhavetocopyalloftheothercodean