<?php
class jokz {
static public $val='123';
static public function xxx() {
jokz2(self);
}
}
function jokz2($obj) {
echo $obj::$val;
}
jokz::xxx();
?>
it returns fatal error, cause the class "self" couldn't be found... so.. how can i make that work?
fonksiyonunda referans bir parametre geçirerek de işe yaramazsa
function jokz2(&$obj) {
echo $obj::$val;
}