PHP Classes

File: tests/is_decimal.php

Recommend this page to a friend!
  Classes of Ali YILMAZ   Mind Framework   tests/is_decimal.php   Download  
File: tests/is_decimal.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Mind Framework
Framework that implements several design patterns
Author: By
Last change:
Date: 1 year ago
Size: 748 bytes
 

Contents

Class file image Download
<?php
require_once ('../src/Mind.php');

$Mind = new Mind([
   
'db'=>[
       
'drive' => 'mysql', // mysql, sqlite
       
'host' => 'localhost',
       
'dbname' => 'mydb', // mydb, app/migration/mydb.sqlite
       
'username' => 'root',
       
'password' => '',
       
'charset' => 'utf8mb4'
   
]
]);

if(
$Mind->is_decimal(1.2)){
    echo
'1.2 is decimal';
}else{
    echo
'1.2 is not decimal';
}

echo
'<br>';

if(
$Mind->is_decimal('1.2')){
    echo
'1.2 is decimal';
}else{
    echo
'1.2 is not decimal';
}

echo
'<br>';

if(
$Mind->is_decimal('1')){
    echo
'1 is decimal';
}else{
    echo
'1 is not decimal';
}

echo
'<br>';

if(
$Mind->is_decimal(1)){
    echo
'1 is decimal';
}else{
    echo
'1 is not decimal';
}