Archived
What are the differences between abstract class and interface?
-1
Community Evaluations
Auteur anonyme
24/07/2022
You can define a private method in an abstract class.
<?php
abstract class A {
abstract public function fn();
protected function fn2()
{
$this->fn3();
}
private function fn3()
{
echo 'fn3';
}
}
class B extends A {
public function fn()
{
echo 'fn';
}
public function __construct() {
$this->fn2();
}
}
new B();
3
What will this code display?2
Which of the following are PHP framework names?2
Write a PHP code that displays the full name of a person.2
Which of the following statements are correct?4
Which of these PHP code snippets are valid?2
What will this code display?3
Display the first element of an array in PHP