Skip to content

v1.1.0

Latest
Compare
Choose a tag to compare
@divinity76 divinity76 released this 20 Sep 14:48
3499670

now support int and float

function quoteshellarg(string | int | float $arg): string

Now require PHP>=8.0.0 (up from PHP7.2.0)

var_dump(array(
    'INF' => quoteshellarg(INF),
    'NAN' => quoteshellarg(NAN),
    '1.234567890' => quoteshellarg(1.234567890),
    123 => quoteshellarg(123),
));

array(4) {
  ["INF"]=>
  string(5) "'INF'"
  ["NAN"]=>
  string(5) "'NaN'"
  ["1.234567890"]=>
  string(20) "'1.2345678899999999'"
  [123]=>
  string(5) "'123'"
}