コード例 #1
0
ファイル: index.php プロジェクト: cnLazy/jsFunction
<?php

class TestStatic
{
    public function One($content)
    {
        static $context = [];
        if ($content == 'return') {
            return $context;
        }
        $context[] = $content;
    }
    public function tw()
    {
        var_dump($this->One('return'));
    }
}
$A = new TestStatic();
$A->One('AAAAA');
$B = new TestStatic();
$B->One('BBBBB');
$C = new TestStatic();
$C->One('CCCCC');
$D = new TestStatic();
$D->One('DDDDD');
$E = new TestStatic();
$E->tw();