<?php

class A{
	public static function test(){
		return new self();
	}
	
	public static function another_test(){
		return new static();
	}
	
	public static function alert(){
		echo "A";
	}
}

class B extends A{
	public static function alert(){
		echo "B";
	}
}

$b = new B();
$c = B::test();
$c->alert();

$d = B::another_test();
$d->alert();