0

How can I fix this error?

PHP Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed

This is my codes :

class ST{
    private $Serial;

    public function __construct($F){
        $this->Serial = serialize($F);
    }
    public function Get(){
        return $this->Serial;
    }
}

$ST = new ST(function (){
    //echo "How Are You";
});

echo $ST->Get();
Hasta Dhana
  • 4,699
  • 7
  • 17
  • 26
Monster
  • 1
  • 2

0 Answers0