« first day (3458 days earlier)      last day (1481 days later) » 

12:06 AM
@DaveRandom currently, they're running out of places to store oil...
@DaveRandom this could be said about many things, like having children, for example ...
 
@DaveRandom I doubt that was a vegan recipe... only that you didn't need to add eggs and milk. It's likely in a dehydrated form in it.
 
 
2 hours later…
2:09 AM
Laminas Project finally got legal foundations sorted and we are setup on Community Bridge.
Help spread the word! https://twitter.com/getlaminas/status/1246148347037192193
 
2:22 AM
@Xerkus What is your role in it?
 
TSC - Technical Steering Committee
I want to be a part time dev too. Hopefully once I switch to stable full time job I won't be so exhausted by the end of the day.
 
Cool.
What does the TSC do?
Oh, found it:
> Its role will be to make decisions about what we maintain, what milestones to work on, who has commit access to specific repositories, and the general technical direction of the project.
 
@LeviMorrison @LeviMorrison Yeah, it is declared in Laminas Project charter: github.com/laminas/technical-steering-committee/blob/master/…
 
You'd be a great person for me to talk to sometime about integrating OpenTelemetry into Laminas then. OpenTelemetry went beta in a few languages recently, though not the PHP SDK.
I think observability is a key feature for modern frameworks.
I'm one of the few developers working on the SDK, and I only can spend an hour or two per week on it atm, so it's slowgoing.
@DaveRandom I have no advice for eggs, either. When my wife was vegan for a bit we just avoided baking shrug
 
2:37 AM
@LeviMorrison honestly, I'm fine with just buying ethically acceptable eggs. In general I'm not sure why there's such a prevailing "all or nothing" mentality around veganism (maybe that's just my experience though)
 
We were getting into vegetarianism for a while, then my brother who lives with me found out he's allergic to soybeans, almonds, and many other plant based proteins we'd been using. So yeah, we're pretty heavy on meats now.
 
eggs are one of the easiest things (for me) to get hold of not-crappy ones at a practical price
@LeviMorrison urgh that's a pain
 
We try to buy meats from places that practice regenerative agriculture, which is generally better for the animal and definitely is better for the planet ecosystem.
 
but yeh, it's all about pragmatism for me. I'm generally on board with the ethical/environmental benefits but at the same time you have to be able to live your life
 
We still have a few vegan meals we make. For instance, last night we had Mediterranean style baked sweet potatoes with chickpeas.
 
2:40 AM
also I like bacon and I like steak and I'm not going to feel bad about eating them occasionally
 
Theoretically there is such a thing as ethically produced steak because beef cows can range on land unsuited for growing foods directly for humans. Chickens are primarily fed grains, though, which is a problem. If it can grow grains, it can grow them for humans instead of chickens.
It's one aspect I almost never hear anyone talk about: proper land use.
 
yeh because that's boring and complicated and hard to get anyone to listen to
 
And we should be eating more goat for the same reason. Goats can eat a lot of weeds and such that cows cannot. I literally can't even find goat for sale around here, despite living in sagebrush country.
 
aren't they broadly similar to sheep in terms of land use?
 
Goats are weird
I guess they're somewhere in-between cows and a pet dog/cat, and it just feels weird
 
2:44 AM
<resists temptation to call @Tiffany weird>
 
No, not really. Goats will eat woody plants like sagebrush and tree saplings. Sheep like prairie, like cows, but in my experience (which is not a lot) they prefer grass even more than cows.
 
I am weird
 
@Tiffany Many people raise goats as pets, it's not weird.
Baby goats can be quite cute and friendly.
 
And some of them jump
 
I'm trying to convince my dad to get goats to help maintain the weeds on his 17 acres. The problem is that will require substantial fencing upgrades for 17 acres...
 
2:46 AM
I find cows weirder than goats tbh, they seem like an evolutionary mistake, basically an A frame draped in meat
they don't look like they should be able to survive
 
They are heavily domesticated at this point. Imagine them more like water buffalo :)
 
Bulls are mean
 
Interesting. So it is some kind of advanced logging with causality baked in?

I am not sure if it is something to be integrated into existing packages, looks more user-spacey.
I would guess integration would look as additional packages that would provide baseline setup for the framework users.
Relevant: https://github.com/laminas/technical-steering-committee/blob/master/meetings/minutes/2020-03-02-TSC-Minutes.md#migrating-existing-libraries-to-laminas
 
@Xerkus I looked briefly at Laminas, seems maybe it would just be a middleware for the basic request/response cycle.
 
there's a fantastic bit in a discworld book where a god has retired to an island to try and create a more flammable cow because people keep sacrificing them and he's fed up with them taking ages to burn because the are too soggy
 
2:48 AM
@DaveRandom WHAT IS ITS NAME?
You are probably the only person I have ever heard mention this series in a non-discworld forum! I love Terry Pratchett.
 
the book? trying to remember which one it is, not read any of then for years
one of the ones with the wizards
 
Maybe Small Gods?
 
I think maybe the lost continent
 
I should be reading discworld this quarantine.
 
I've debated on reading Discworld, but I'm guilty in that I only started paying attention to Terry Pratchett after Good Omens TV
 
2:50 AM
I think it's the one where one of the faculty (the dean?) has created some sort of portal in his office to go on holiday
@LeviMorrison also recommend (re)listening to the HHGTTG radio series
I assume you are familiar with it but if not you are in for a treat
I can provide mp3s
 
@Tiffany Oh man, for some reason I love it. It's a nice mix of fantasy, political satire, and comedy (not all satire is funny, this is). It has good character development, and there are lot of characters.
 
I ought to rewatch Good Omens sometime during lockdown
 
yeh, there's a few separate sets of recurring characters as well, there's cross over but there are a couple of distinct groups
 
I used to get a Discworld book for Christmas each year when I lived at home.
My problem is that when I pick up a book, I have a hard time putting it down. I read most books cover-to-cover in one sitting. It's really bad.
 
If you want a random standalone one to start, i recommend Soul Music
 
2:54 AM
@Tiffany look for Going Postal, a two part TV series
 
I wish I could read books in one sitting, but I read too slowly :/
 
I've never got in to any of the TV/film versions of anything discworld, the books are so much better
there's some audiobook versions read by tony robinson that are quite good as well
 
I bet amazon audible have audiobook versions, if you use amazon kindle, kindle app or browser to read books
 
seriosly though, all of you need to go and listen to HHGTTG immediately
go now. I'll wait.
 
lol I have work to do, thanks.
 
2:56 AM
I need to buy a new Kindle, kinda broke the screen on mine :/
@LeviMorrison not anymore
 
@DaveRandom Not surprised; how do you put the fact that Death speaks in smallcaps and without quotes into the medium? He has a lot of things like that.
 
Besides, it's 8pm your time, on a Friday
@LeviMorrison Good Omens is a pretty good adaptation though.
 
@Tiffany I'll look it up, thanks!
 
Hell, it's worth watching for the half hour of David Tennant and Michael Sheen playing off one another
I haven't finished the entire book, but Aziraphale is a little different in the book, but even so, Michael Sheen pulls it off pretty well
Plus ton of little Easter eggs, pretty sure there's one or two for Discworld
 
@LeviMorrison weirdly I have an ridiculously specific answer to that question, in my head it sounds almost identical to the voice of Moses in the South Park episode "Jewbilee"
 
3:03 AM
@DaveRandom @DaveRandom I have the ultimate hhgttg kindle version, 5 books in one. But no audible version so no listening for me =/
 
He's almost has like this assured whisper. Not full volume voice, but just audible.
 
@DaveRandom How vulgar is that specific episode? A lot of it is too much for my liking.
@Xerkus Does Laminas have an ORM or similar?
 
that episode is not particularly vulgar in terms of toilet humour, it pokes fun at judaism quite a lot which is kind of a hot potato but I don't find it offensive, it's done quite intelligently
 
@LeviMorrison There is Laminas\Db that have table data gateway. I personally never use it, I consider it a legacy thing that is inherited from Zend Framework 1 times. For ORM needs there is Doctrine. No need to reinvent things.
 
Then maybe a middleware is all that is needed, which doesn't require any official support, of course.
Is there an HTTP client or similar?
 
3:08 AM
@Xerkus I'll have a look for it, but since it was on UK TV, not sure how much luck I'll have
 
@Xerkus remind me tomorrow and I can sort you some plain old MP3s
 
@DaveRandom nah, i'm good. I know how to use torrent ;)
 
:-P
I don't have any decent sources for non-TV torrents any more, I let my ipt membership lapse and I cba with public trackers, too much shite
 
@DaveRandom intern placement tracking?
 
@LeviMorrison discussion might be better moved to laminas slack if you don't mind, laminas.dev/chat
 
3:33 AM
anyone know how sensitive phpt tests are to new lines? specifically, do they care about \n vs \r\n and do they tollerate differences in the number of trailing new lines?
 
@DaveRandom dunno about phpt tolerating random trailing new lines and \r\n but I certainly do not.
 
:-P
I guess it must normalise \r\n thinking about it, otherwise var_dump()-based tests would blow up all the time
(pretty certain var_dump() terminates lines in it's output with PHP_EOL?)
 
I really need to stop watching cake decorating videos. They're giving me ideas
 
3:50 AM
If they give you ideas, then you must have skills.
Anyone know if a helper like this exists in the ZEND_API? I've found things that are close, but not fully general. call_user_function can't seem to call static methods and zend_call_method only works with 0, 1, or 2 args.
static int ddtrace_call_method(zend_object *obj, zend_class_entry *ce, zval *fname, zval *retval, int argc,
                               zval argv[]) {
    zend_function *method =
        obj ? zend_std_get_method(&obj, Z_STR_P(fname), NULL) : zend_std_get_static_method(ce, Z_STR_P(fname), NULL);

    zend_fcall_info fci = {
        .size = sizeof(zend_fcall_info),
        .function_name = *fname,
        .retval = retval,
        .params = argv,
        .object = obj,
        .no_separation = 1,  // todo: ???
/cc the people who seem to know all of PHP's APIs @NikiC @JoeWatkins @bwoebi
 
 
1 hour later…
Wes
5:06 AM
mornings
 
5:56 AM
Wes o/
 
Wes
\o
 
@LeviMorrison not sure if its exactly what you ask but we have this in tideways (5.3 - 7.4) as a helper i always wanted to contribute to core. Maybe 8 :)
 
 
3 hours later…
 
1 hour later…
10:11 AM
Morning
And... now I pass back out
 
cmb
hmm, 0 might have been excluded deliberately, to avoid a foot gun. Not sure, though.
NEWS is not supposed to be automatically merged up, see https://wiki.php.net/vcs/gitfaq#mandatory_git_settings.
Anyhow, this fix needs an entry in NEWS.
 
 
2 hours later…
11:57 AM
morns
 
@DaveRandom Thanks I will probably use this for master, what's your PHP username so that I can put credit where credits is due?
Ah that's what I forgot to do ... currently on a machine I don't normally use so forgot to do that. I've got an idea how to improve the implementation for that so that it doesn''t footgun but wanted to fix the tests before going to bed.
Can I modify the text of the warning in PHP 7.3/7.4?
 
cmb
12:18 PM
you mean something like "Unknown character" to "Unsupported character"? It's always a small BC break (e.g. tests may break), but it may be appropriate.
I wonder, though, what the [docs](https://www.php.net/mb-substitute-character) mean with "Invalid characters may be substituted NULL (no output), string or integer value (Unicode character code value)." NULL is converted to zero, and as such unsupported (https://3v4l.org/04gd0).
Has the special support for NULL been lost decades ago?
 
@cmb From reading the code it just means that you define the behaviour of what happens on an invalid code point, just remove it, replace it with another specific code point, or a string (e.g. HTML entity) but a NUL byte is valid codepoint, maybe a dumb one to use but a vlid one
But that phrasing just seems off
I need to go through the MBString documentation anyway cause some things are not documented
Also for the warning I was more going along adding a is_numeric_string() check and emit a warning like: "String value must be 'none'|'entity'|'long' or a valid numeric string"
That would catch all the bonkers string values but still let strings be used for code points
 
cmb
@Girgias ah, okay, that would be "none".
 
Indeed
 
cmb
@Girgias that looks like too much of BC break for 7.3/7.4
 
@cmb The thing is all the invalid strings were converted to 0 and already emitted the warning
(with a false return)
 
cmb
12:28 PM
ah, okay, then changing the error message might be seen as bugfix; maybe do a PR, and wait a while whether someone complains?
 
Will do then :)
 
1:21 PM
Why does this regex expression accept numbers?

/^(\d+\w|\w+\d)(\d|\w)*/

It has to contain numbers and letters
 
@X4748-IR Because \w means a word and is equivalent to [A-Za-z0-9_]
One search about what \w is would have given you the anwser
 
I thought it only accepts letters. Thanks.
Yeah. it's my bad! I had to google that.
 
2:05 PM
Anyone has an idea why an empty ZVAL string passes ignores this check
if (Z_STRLEN_P(arg1) < 1) {
 
2:17 PM
@Girgias what's the context?
 
Figured it "out", and empty string pass an Z_TYPE_P(arg1) == IS_STRING check
So I'm working the mb_substitute_character function because my bugfix doesn't warn on bogus strings anymore because every string just gets converted to 0 which now is a valid code point
So I'm restoring the previous sane behaviour for non numeric strings
Now, I wanted to check for empty strings because I do think that it shows some problem and previously did emit a warning
But I think it's something on how the parser deals with literal '' and "" strings
 
2:48 PM
@Girgias daverandom :P
 
Well that was easy then
 
Lol at most people's description referencing kittens
 
 
2 hours later…
Wes
4:49 PM
\o
 
o/
 
5:12 PM
\o
 
5:36 PM
Hello
 
wtf does PHP complain for ~true but not for true | 2 :-/
 
new PHP sadness
 
I just wanted to change existing logic ($somebool | $int) to (~$somebool & $int) and it exploded in my face :-/
 
#justphpthings
 
5:51 PM
I mean … for everything in integer context false -> 0, true -> 1, except for ~ ?!?
 
Going though PHPSadness again, why is it that Sessions don't serialize the same way as serialize() ?
 
Jellow
 
I think you can choose your serialization handler but god only knows =\
 
6:19 PM
!!lxr stream_socket_get_name
 
Total number of search results: 5
• [ /php-src/ext/opcache/Optimizer/zend_func_info.c::309 ] F1("<b>stream_socket_get_name</b>", MAY_BE_FALSE | MAY_BE_STRING),
• [ /php-src/ext/standard/basic_functions_arginfo.h::2764 ] ZEND_FUNCTION(<b>stream_socket_get_name</b>);
• [ /php-src/ext/standard/basic_functions_arginfo.h::3402 ] ZEND_FE(<b>stream_socket_get_name</b>, arginfo_stream_socket_get_name)
• [ /php-src/ext/standard/streamsfuncs.c::294 ] /* {{{ proto string|false <b>stream_socket_get_name</b>(resource stream, bool want_peer)
• [ /php-src/ext/standard/streamsfuncs.c::296 ] PHP_FUNCTION(<b>stream_socket_get_name</b>)
 
7:07 PM
@StatikStasis I bought it, I receive it next Wednesday :O
 
7:59 PM
Good afternoon everyone. I am putting the mysqli connection file in the autoload, but it is not loading the $mysqli variable. How do it work? Thank you.
"autoload": {
    "files": [
      "painel/config.php"
    ]
  },
config.php
$mysqli = new mysqli("localhost", "bd", "aaaaa", "bd");
if($mysqli->connect_error){
    echo "Error";exit();
}
$mysqli->set_charset("utf8");
On the index.php page, I use require _DIR_ . "/../vendor/autoload.php";, but this error message appears:
Notice: Undefined variable: mysqli
What do I need to do to have the $mysqli variable loaded into autoload?
 
Is this documented behaviour or a known bug? 3v4l.org/epLNY
__set() doesn't work with implicit array creation.
 
?
Can someone help me please?
 
@Bell you are looking for &__get
 
8:15 PM
@Nikic: ah, thanks!
 
:(
Please
 
8:32 PM
0
Q: Mysqli connection does not load in composer. Notice: Undefined variable: mysqli

TiagoGood afternoon everyone. I am putting the mysqli connection file in the autoload, but it is not loading the $mysqli variable. How do it work? Thank you. composer.json "autoload": { "files": [ "painel/config.php" ] }, config.php $mysqli = new mysqli("localhost", "bd", "xxxx", ...

 
@Tiago Did you dump the autoloader? But that's my only guess
 
@MátéKocsis As well?
 
@Tiago the autoload.php is updated after running composer install/update/dump-autoload
 
@MátéKocsis Got it, I had already done it, but it still doesn't work :(
 
Sorry to hear :(
 
8:41 PM
@MátéKocsis Do you suggest another way to start mysqli?
 
 
1 hour later…
9:53 PM
posted on April 03, 2020

News coming later this weekend. Netflix is calling.

 

« first day (3458 days earlier)      last day (1481 days later) »