Today I learned
dalecosp I watched Highlander
dalecosp
I still like his turn in "The Name of the Rose".
Today I learned that I'm not the only person who has seen Zardoz. That movie is awesomely crap-tastic. https://www.youtube.com/watch?v=AfuK_KJTRyg
"The gun is good" --- family motto. ;-)
dalecosp you might not like what else ol' Zardoz has to say...
TIL that the film 'Lawrence of Arabia' had its world premiere 10 years closer to the start of the Great War than to the current day.
dalecosp and Rampling, for all her modern foibles, was something to behold.
TIL that returning false
works if you declare return type int:
function foo() : int {
return false;
}
var_dump(foo());
the result:
int(0)
but returning NULL
from an int function throws an exception:
function foo() : int {
return null;
}
var_dump(foo());
the result:
PHP Fatal error: Uncaught TypeError: Return value of foo() must be of the type integer, null returned in /tmp/a.php:3
Stack trace:
#0 /tmp/a.php(5): foo()
#1 {main}
thrown in /tmp/a.php on line 3
- Edited
You'll also get that if you try to return a non-numeric string (a numeric string would be recast).
Also, attempting to return anything other than an int fail if you declare(strict_types=1);
.
Returning null is hazardous, and equivalent to returning nothing at all (return null;
is identical in meaning to return;
; if a function is supposed to return a value, return;
looks wrong). If for some reason you do want nulls hanging around, you can declare the possibility as function foo(): ?int
.
Today I learned Mira Furlan is dead, this year sucks let's go to 2022
TIL that the U.S. Government website for reporting online crime does not work:
curl -v https://www.ic3.gov/complaint/default.aspx
* Trying 65.201.175.169:443...
* TCP_NODELAY set
* Trying 2600:803:c20::3:16:443...
* TCP_NODELAY set
* Immediate connect fail for 2600:803:c20::3:16: Network is unreachable
* Trying 2600:803:c20::3:15:443...
* TCP_NODELAY set
* Immediate connect fail for 2600:803:c20::3:15: Network is unreachable
* Trying 2600:803:c20::3:16:443...
* TCP_NODELAY set
* Immediate connect fail for 2600:803:c20::3:16: Network is unreachable
* Trying 2600:803:c20::3:15:443...
* TCP_NODELAY set
* Immediate connect fail for 2600:803:c20::3:15: Network is unreachable
- Edited
Today I learned PHP filters. I really enjoy the PHP language while I am learning it.
TIL (thanks to sneakyimp) that you can do...
16:16 $ /usr/bin/php -a
Interactive shell
php > $
= 'happy';
php > echo $
;
happy
php >
you can define emoji classes and namespaces, too:
class
{
public static function
(){
echo "
\n";
}
}
::
();
- Edited
Today i learned how to register here!
Today I learned how to turn my old laptop into a server at home
cluelessPHP linux?