Jump to content

class abstraction (fixed)


keeB

Recommended Posts

Hello everyone, it feels weird posting my own topic instead of answering others! :)

I have a quick question about abstract classes. What is wrong with the following code?

[code=php:0]
<?php
abstract class a {
public $a = 5;
}

class b extends a {
public function b() {
print a::$a;
}
}
?>[/code]

Your thoughts are appreciated
Link to comment
https://forums.phpfreaks.com/topic/29153-class-abstraction-fixed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.