PHP Classes

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

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php   Download  
File: Library/vendor/phpdocumentor/type-resolver/examples/01-resolving-simple-types.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 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'));