All pastes #521404 Raw Edit

Someone

public text v1 · immutable
#521404 ·published 2007-05-30 05:31 UTC
rendered paste body
<?php

class foo {

	public function __construct(){
		$this->$m=array();
		$this->$c=array();

	}

	public function update($m,$c){
		$this->$m[]=$m;
		$this->$c[]=$c;
	}

	public function display(){
		$m=$this->$m;
		for ($i=0;$i<count($m);$i++){
			echo "$m[i] \n";
		}

		$c=$this->$c;
		for ($i=0;$i<count($m);$i++){
			echo "$c[i] \n";
		}
	}

	public function f1(){
		$this->update('f1','f1');
		
	}

	public function f2(){
		$this->update('f2','f2');
	}


	public function d(){
		$this->f1();
		$this->f2();
	}
}

$foo=new foo();
$foo->d();


?>