File modules/dsl/standard/NumberWrapper.class.php
Last commit: Tue Jul 19 00:10:19 2022 +0200 Jan Dankert New: Secure Flag for Script Interpreter which is enabled by default.
1 <?php 2 3 4 namespace dsl\standard; 5 6 7 use dsl\context\BaseScriptableObject; 8 9 class NumberWrapper extends BaseScriptableObject 10 { 11 public $MAX_SAFE_INTEGER = PHP_INT_MAX; 12 public $MIN_SAFE_INTEGER = PHP_INT_MIN; 13 14 public function __toString() 15 { 16 return "Number"; 17 } 18 19 20 public function __invoke( $value ) 21 { 22 return new NumberInstance( $value ); 23 } 24 25 public function parseFloat( $num ) 26 { 27 return floatval($num ); 28 } 29 30 public function parseInt( $num ) 31 { 32 return intval($num); 33 } 34 35 public function valueOf( $val ) 36 { 37 return new NumberInstance( $val ); 38 } 39 }
Downloadmodules/dsl/standard/NumberWrapper.class.php
History Tue, 19 Jul 2022 00:10:19 +0200 Jan Dankert New: Secure Flag for Script Interpreter which is enabled by default.