PHP Classes

File: vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php

Recommend this page to a friend!
  Classes of Renato Lucena   PHP Pokemon Script   vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php   Download  
File: vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Pokemon Script
Provides an API to manage a database of Pokemons
Author: By
Last change:
Date: 6 years ago
Size: 338 bytes
 

Contents

Class file image Download
<?php

use phpDocumentor\Reflection\TypeResolver;

require
'../vendor/autoload.php';

$typeResolver = new TypeResolver();

// Will yield an object of type phpDocumentor\Types\Compound
var_export($typeResolver->resolve('string|integer'));

// Will return the string "string|int"
var_dump((string)$typeResolver->resolve('string|integer'));