<?php
function println($msg)
{
echo $msg . "\n";
}
abstract class A
{
protected $wat = 'aaaa';
public function a()
{
println('a(): ' . $this->wat);
}
}
class B extends A
{
protected $wat = 'bbbb';
public function b()
{
println('b(): ' . $this->wat);
}
}
$b = new B;
$b->a();
$b->b();
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/uiEhs on line 8
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; B has a deprecated constructor in /in/uiEhs on line 18
b(): bbbb
a(): bbbb
b(): bbbb