PHP Classes

File: src/eMacros/Runtime/Type/TypeOf.php

Recommend this page to a friend!
  Classes of Emmanuel Antico   eMacros   src/eMacros/Runtime/Type/TypeOf.php   Download  
File: src/eMacros/Runtime/Type/TypeOf.php
Role: Class source
Content type: text/plain
Description: Class source
Class: eMacros
PHP LISP language interpreter
Author: By
Last change:
Date: 10 years ago
Size: 485 bytes
 

Contents

Class file image Download
<?php
namespace eMacros\Runtime\Type;

use
eMacros\Runtime\GenericFunction;

class
TypeOf extends GenericFunction {
   
/**
     * Obtains a value type
     * Usage: (type-of 4)
     * Returns: string
     * (non-PHPdoc)
     * @see \eMacros\Runtime\GenericFunction::execute()
     */
   
public function execute(array $arguments) {
       
//check number of parameters
       
if (empty($arguments)) {
            throw new \
BadFunctionCallException("TypeOf: No arguments found.");
        }
       
        return
gettype($arguments[0]);
    }
}
?>