Dynadot
Spaceship Spaceship
  • •••
    •••
    This PHP function performs a regex search and replace using a callback.

    Code:
    preg_replace_callback(
        string|array $pattern,
        callable $callback,
        string|array $subject,
        int $limit = -1,
        int &$count = null,
        int $flags = 0
    ): string|array|null

    PHP: preg_replace_callback - Manual
    •••
    •••
    •••
    JavaScript arrow functions are terse and great for callbacks.

    JavaScript:
    const materials = [
      'Hydrogen',
      'Helium',
      'Lithium',
      'Beryllium'
    ];
    
    console.log(materials.map(material => material.length));
    // expected output: Array [8, 6, 7, 9]

    Arrow function expressions - JavaScript | MDN
    •••
    redemo
    redemo
    You're a clever guy!
    Missing Coreutils and need Base64? Give these commands a try!

    Code:
    $ echo -n 'foo' | openssl base64
    Zm9v
    
    $ echo 'Zm9v' | openssl base64 -d
    foo

    /docs/man1.1.1/man1/enc.html
    •••
    •••
    redemo
    redemo
    Gylex
    Gylex
    @redemo, I appreciate the encouragement and additional resources. This topic presents a great opportunity to learn more about server management and security. Thanks! —John G.
    •••
    •••
  • Loading...
  • Loading...
  • Loading...
  • Loading...
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back