<?php

class A {
	private function __construct () {
		echo "Created!\n";
	}
	public static function attemptToCreate ($should_it_succeed) {
		if ($should_it_succeed) {
			return new A();
		}
		return false;
	}
}

var_dump(A::attemptToCreate(0));
var_dump(A::attemptToCreate(1));

//! new A(); - gives error