/ LJCPHPCodeDoc / LJCCommonLib / LJC / ToBoolInt


Parameters
$text - The text value.

Returns

The int bool value.

Syntax

PHP
public static function ToBoolInt(?string $text): int

Returns a text value as an int boolean.

Example

PHP
 // Returns a text value as int boolean.
 private static function ToBoolInt()
 {
   $text = "false";
   $value = LJC::ToBoolInt($text);
   $result = strval($value);
 
   // result:
   // 0
 }

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.