<?php
/// parent class
interface iA {
public function execute($str = '');
}
class A implements iA {
public function __construct() { }
public function execute($str = '')
{
return 'Execution ' . $str;
}
}
/// child class
interface iB {
public function execute($str = '');
}
class B extends A implements iB {
public function __construct()
{
parent::__construct();
}
public function execute($str = '')
{
return parent::execute();
}
}
PD9waHAKCi8vLyBwYXJlbnQgY2xhc3MKaW50ZXJmYWNlIGlBIHsKICAgIHB1YmxpYyBmdW5jdGlvbiBleGVjdXRlKCRzdHIgPSAnJyk7Cn0KCmNsYXNzIEEgaW1wbGVtZW50cyBpQSB7CgogICAgcHVibGljIGZ1bmN0aW9uIF9fY29uc3RydWN0KCkgeyB9CgogICAgcHVibGljIGZ1bmN0aW9uIGV4ZWN1dGUoJHN0ciA9ICcnKQogICAgewogICAgICAgIHJldHVybiAnRXhlY3V0aW9uICcgLiAkc3RyOwogICAgfQp9CgovLy8gY2hpbGQgY2xhc3MKaW50ZXJmYWNlIGlCIHsKICAgIHB1YmxpYyBmdW5jdGlvbiBleGVjdXRlKCRzdHIgPSAnJyk7Cn0KCmNsYXNzIEIgZXh0ZW5kcyBBIGltcGxlbWVudHMgaUIgewoKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdCgpCiAgICB7CiAgICAgICAgcGFyZW50OjpfX2NvbnN0cnVjdCgpOwogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBleGVjdXRlKCRzdHIgPSAnJykKICAgIHsKICAgICAgICByZXR1cm4gcGFyZW50OjpleGVjdXRlKCk7CiAgICB9Cgp9Cgp2YXJfZHVtcCgobmV3IEIpLT5leGVjdXRlKCkpOw==