<?php
abstract class base {
abstract protected function so();
function algo(){ return "aaa";}
}
class test extends base{
protected function so(){ echo $this->algo(); }
}
$a = new test();
$a->so();
Fatal error: Uncaught Error: Call to protected method test::so() from global scope in /in/p4kEl:14
Stack trace:
#0 {main}
thrown in /in/p4kEl on line 14
Process exited with code 255.
Fatal error: Uncaught Error: Call to protected method test::so() from context '' in /in/p4kEl:14
Stack trace:
#0 {main}
thrown in /in/p4kEl on line 14
Process exited with code 255.