php特殊案例数组调用方法

Posted 熊二

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php特殊案例数组调用方法相关的知识,希望对你有一定的参考价值。

 

> As of php 5.4.0, you can call any callable stored in a variable.

```php

<?php
class Foo
{
    static function bar()
    {
        echo "bar ";
    }
    function baz()
    {
        echo "baz ";
    }
}

$func = array("Foo", "bar");
$func(); // prints "bar"

```















以上是关于php特殊案例数组调用方法的主要内容,如果未能解决你的问题,请参考以下文章