Skip to content
Advertisement

Tag: default

PHP Libsodium default encryption method

I’m sure this must’ve been asked and answered but can’t find where… With libsodium in PHP (7.0 / 7.1), what is the default encryption method employed (or where to find it) when you do something like this? A client wants it stated in the handover documentation but I can’t find what it is. Answer Algorithm details Encryption: XSalsa20 stream cipher

Default value for username in SQL database

I’m writing a Laravel application, and for testing in sqlite you need to specify ->nullable() or ->default(“123”) for all fields in your migration. This confuses me as my User-migration currently looks like this: Many of these make no sense to add neither ->default(“123”) nor ->nullable() to. Username is a good example, I can’t have null as a username in the

Using Default Arguments in a Function

I am confused about default values for PHP functions. Say I have a function like this: What if I want to use the default argument for $x and set a different argument for $y? I have been experimenting with different ways and I am just getting more confused. For example, I tried these two: But both of those do not

Advertisement