79708351

Date: 2025-07-20 20:28:59
Score: 0.5
Natty:
Report link

As of PHP 8.1 there's a syntax for it - https://www.php.net/manual/en/functions.first_class_callable_syntax.php

class MyClass
{
  function myFunc1()
  {
     ...
  }
  function myFunc2()
  {
    $callable = $this->myFunc1(...);
    $callable();
  }
}
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Roman Hocke