JsonSerialize Interface of PHP

Code
<?php

class Foo implements JsonSerializable
{
    private 
$fooName;
    private 
$fooStatus;
    
    public function 
__construct($fooName$fooStatus)
    {
        
$this->fooName $fooName;
        
$this->fooStatus $fooStatus;
    }
    
    public function 
jsonSerialize()
    {
        return array(
            
'name' => $this->fooName
            
'status' => $this->fooStatus,
        );
    }
}

$foo = new Foo('FooAsVarName''OK');
echo 
json_encode($foo);
Result
{"name":"FooAsVarName","status":"OK"}
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6