KScript documentation
FR

Ce qui a changé

Commandes

Avant Maintenant
@to_upper($t), @to_lower($t) $t->upper(), $t->lower()
@string($v), @number($t), @date($t), @type($v) $v->to_string(), $t->to_number(), $t->to_date(), $v->type()
@json($t), @to_json($v), @yaml($t), @to_yaml($v) $t->convert(from: json), $v->convert(to: json), $t->convert(from: yaml), $v->convert(to: yaml)
@escape($t), @base64($t), @url_encode($t), @url_decode($t) $t->escape(), $t->to_base64(), $t->url_encode(), $t->url_decode()
@pow($a, $b) $a ** $b
@guid() @uuid()
@contrast(...) @contrast_color(color, dark?, light?)
@signed_in() @is_signed_in()
@log(8, 2) @logarithm(8, 2) (log est l'instruction qui écrit une entrée de journal)
@config('database.port', 5432) $config.database.port, ou $config->get('database.port', 5432)
@exit(1), @error('Too short') exit 1, throw Validation "Too short"
@transaction(...) l'instruction transaction, ou $db->transaction(fn)

Edit this page on GitHub