All pastes #2068665 Raw Edit

Mine

public text v1 · immutable
#2068665 ·published 2011-05-24 21:46 UTC
rendered paste body
<?php

class oktoberfest
{
	private $t;

	public function __construct()
	{
		$this->t = 'Oktoberfest Win';
	}
	public function huh()
	{
		return $this->t;
	}
	public static function a_static_call()
	{
		return 'A static Oktoberfest';
	}
}

class frau
{
	public function __construct()
	{
		// just a quick example, no shit to do here...
	}
	public function loves()
	{
		// Statically calling a method in another class...
		echo oktoberfest::a_static_call();
		echo PHP_EOL;

		// Dynamic fun
		$wiesn = new oktoberfest();
		echo $wiesn->huh();
		echo PHP_EOL;
	}
}

$frau = new frau();
$frau->loves();


?>