private function isReference(&$value): array
  {
    switch (true)
    {
      case is_bool($value):
      case is_null($value):
      case is_int($value):
      case is_string($value):
      case is_double($value):
      case is_resource($value):
        $ref = $this->testSeen($value);
        break;

      case is_object($value):
        $ref = $this->testSeenObject($value);
        break;

      case is_array($value):
        $ref = $this->testSeenArray($value);
        break;

      default:
        throw new FallenException('type', gettype($value));
    }

    $id = ($ref===null) ? sizeof($this->seen) - 1 : null;

    return [$id, $ref];
  }
private function isReference(&$value): array
  {
    switch (true)
    {
      case is_bool($value):
      case is_null($value):
      case is_int($value):
      case is_string($value):
      case is_double($value):
      case is_resource($value):
        $ref = $this->testSeen($value);
        break;

      case is_object($value):
        $ref = $this->testSeenObject($value);
        break;

      case is_array($value):
        $ref = $this->testSeenArray($value);
        break;

      default:
        throw new FallenException('type', gettype($value));
    }

    $id = ($ref===null) ? sizeof($this->seen) - 1 : null;

    return [$id, $ref];
  }
private function isReference ( & $ value ) : array { switch ( true ) { case is_bool ( $ value ) : case is_null ( $ value ) : case is_int ( $ value ) : case is_string ( $ value ) : case is_double ( $ value ) : case is_resource ( $ value ) : $ ref = $ this -> testSeen ( $ value ) ; break ; case is_object ( $ value ) : $ ref = $ this -> testSeenObject ( $ value ) ; break ; case is_array ( $ value ) : $ ref = $ this -> testSeenArray ( $ value ) ; break ; default : throw new FallenException ( 'type' , gettype ( $ value ) ) ; } $ id = ( $ ref === null ) ? sizeof ( $ this -> seen ) - 1 : null ; return [ $ id , $ ref ] ; }
If a value has been dumped before returns the ID of the variable. Otherwise returns null.

@param mixed $value The variable.

@return array<int|null>
If a value has been dumped before returns the ID of the variable . Otherwise returns null .