<?php

abstract class Form {
	abstract protected function do_shit();
	
	public function f() {
		$this->do_shit();
	}
	
	public static function build($type) : Form {
		return new $type();
	}
}

class FormA extends Form {
	protected function do_shit() : void {
		echo "A";
	}
}
class FormB extends Form {
	protected function do_shit() : void {
		echo "B";
	}
}

class FormC extends Form {
	protected function do_shit() : void {
		echo "C";
	}
}
class FormD extends Form {
	protected function do_shit() : void {
		echo "D";
	}
}
class FormE extends Form {
	protected function do_shit() : void {
		echo "E";
	}
}


$f = Form::build('FormC');
$f->f();


