Closure
PHP Manual

Closure::call

(Bir sürüm bilgisi bulunamadı; sadece SVN'de olabilir.)

Closure::call — Calls the closure with the given parameters and returns the result, with $this bound to the given object $to

Açıklama

publicClosure Closure::call ( object $to [, mixed $parameters ] )

Calls the closure with the given parameters and returns the result, with $this bound to the given object to

Değiştirgeler

to

parameters

Dönen Değerler

Sürüm Bilgisi

Sürüm: Açıklama
7.0.0 Added Closure::call

Örnekler

Örnek 1 Closure::call() example

<?php
$foo 
= new StdClass;
$foo->bar = 3;
$foobar = function ($qux) { var_dump($this->bar + $qux); };
$foobar->call($foo, 4); // prints int(7)

Closure
PHP Manual