search

Home  >  Q&A  >  body text

How are object methods in classes stored in memory?

<?php

class Demo01

{
          public function say(){
            echo 'hello';
                                 ‐                            # class Sub extends Demo01
{

}

// How is the above object method say() stored in memory? Is there one in the subclass and one in the parent class? And only one copy?
// What happens if this method is overridden in a subclass?


茄子茄子2115 days ago718

reply all(0)I'll reply

No reply
  • Cancelreply