- var_export: documentation ( source)
<?php
class Controller
{
public function myAction()
{
}
public static function myStaticAction()
{
}
}
function test_callable(callable $callable)
{
var_export($callable);
}
test_callable(['Controller', 'myStaticAction']);
test_callable(['Controller', 'myAction']); // Deprecated since PHP 7
test_callable(['Controller', 'notExistingMethod']); // Fatal error: Uncaught TypeError