« first day (3482 days earlier)      last day (1465 days later) » 
01:00 - 23:0023:00 - 00:00

1:04 AM
@Derick Uh oh. We didn't screw anything up, did we? :-)
 
 
2 hours later…
2:41 AM
Hey
Is it possible to get localStorage into php as a variable?
 
 
1 hour later…
4:08 AM
Is there an API for updating a hash value that simultaneously retrieves the previous one? I don't think so, but figured I'd ask.
 
 
2 hours later…
6:03 AM
morning all
 
hi all, blog.decicorp.metacorp.us as a part of the project i need to combine a few techniquex and sscript yourself to a flag and retrieve the admin's credentials. can someone help how to go about it
 
php noob here, can someone teach me how to re-use variables across a dozen functions so I can reduce my code?
 
Any Symfony expert here?
I want to acccess sfWebRequest $request outside controller. Actually in the class which extends to subclass-
`Form extends BaseForm`
 
6:34 AM
if I pass an object to my construct eg:
function __construct($workflow)

do I access it like I normally would inside the construct function?
eg $workflow->data_layer()->get_customer_email();
or do I access it like
$this->workflow->data_layer()->get_customer_email();
 
6:50 AM
@ThomasShields Hey Thomas. You mean JavaScripts local storage? No, it's specifically designed not to be transmitted to the server. You could use a cookie though. php.net/manual/en/features.cookies.php
 
7:39 AM
@Girgias sccp probably
 
@Lukerb Both? You would do the 2nd if you created a workflow property for the class instance and assigned $workflow to it, which is probably what you intend to do. Disclaimer: I don't know what I'm talking about.
@Wes hey! You're ok! =oD
 
Wes
\o yeah thanks. you too? how bad it is over there?
 
@LeviMorrison Don't think so
@Girgias sccp.c has a list of conditions when functions are safe to compile time evaluate. It needs to exclude anything that throws (exceptions or notices)
 
Wes
my disappearance wasn't related to coronavirus though, just took a long pause because burnout
 
@Wes We are under "lockdown" and just hit 1 million casses, but in reality everyone is selfish and out and about. I go to the bank drive-tru ATM every day to pull emergency cash out, and I've seen more traffic during lockdown than on normal days. I guess people have a lot of free time now without having a job.
I created a pandemic kit when we had the Ebola pandemic, so I had all my masks, gloves, hazmat suits, and other gear before this all went down. For once my doomsday prepping paid off.
 
Wes
7:59 AM
lol! yeah i remember you are a prepper :D if i were you i would go visit people in your hazmat suit and tell them "you laughed at me for this, and now look at me, hahahaha" and then run
went for headache painkillers yesterday and 50+ people were in front of the drug stores in queue, chatting at close distance. that is so bad on so many levels. surely actual sick people were in queue behind some idiot was here just to buy a toothbrush, guaranteed. people are like that normally, and they got even worse during this pandemic
 
I have N100 masks, people are robbing each other for N95 masks. Someone asked me where I got my mask when I went grocery shopping. We have like no toilet paper in America, but I got that covered. I have 50K mullein seeds, whose leaves are also referred to as cowboy toilet paper. So if need be... lol
 
Wes
lol :D
 
8:17 AM
@NikiC two questions for you if you have some time, 1.) you replied to tysons proposal/straw vote that he focussed on the wrong things (functions instead of new). As i am pondering what steps next to follow after attributes, what approach do you have in mind to improve constant AST? 2.) what are your plans for named parameters for 8.0? especially with the work on internal argument renaming the timetable is probably needs to account for follow up work on arginfos.
 
8:42 AM
@Derick working with the php_error_cb and stuff, do you think it would help you with xdebug if we had a list of displaying handlers that is iterated over and when it returns 1 it was handled, stops, when 0 it tries the next one? That could help registering error handling for soap, xmlrpc, html, others... then you could register your own with higher priority. /cc @cmb xmlrpc error handling is in main/main.c right now, w.r.t to unbundling
 
php_error_cb does so many things, and it changes by PHP version too (see: bugs.xdebug.org/view.php?id=1758 ). That whole function probably needs multiple hooks.
@Crell No, not at all, I think. But I would like you not having to need an SSH tunnel ;-)
 
@Derick yes, i already worked on one hook that handles all "observing" only use-cases: github.com/php/php-src/pull/4555
 
"PHP Extensions are able to hook into the error mechanism of the Zend Engine by overwriting the zend_error_cb callback. This callback has a lot of responsibilities though (display, repeated error supression, logging, exception conversion), so that overwriting is quite difficult. " That what I just said, but better :-)
 
cmb
@beberlei xmlrpc error handling in main.c: oh, lovely! Thanks for the info.
 
@beberlei How would we pick priorities though?

I mean, the SOAP error handler is also already causing issues...: https://github.com/xdebug/xdebug/blob/master/src/base/base.c#L611
 
8:58 AM
Morning
I need to flip my sleeping schedule... job interview tomorrow at 7AM
 
@Derick yes if your xdebug_error_cb would call some new function "zend_error_cb_display_errors()" which iterates over all "error displayer", then the soap one would detect the header like you did, render itself as soap fault and deny all "following" handlers the right to render the error
 
@Tiffany You seem to be aligned with UTC now :-)
@beberlei I'm all for improving this :-)
keeping the xdebug_error_cb in sync with php_error_cb has been annoying AF
 
let me prototype something, then we can talk about code, not some fancy dream castles
 
@Derick yup. Couple of nights ago, I was going to sleep at 2AM, and today I've woke up at 4AM. I'm a sleeping schedule chameleon
 
hah - which timezone are you physically in though?
 
9:07 AM
UTC-5 when in daylight savings time, UTC-6 outside of it
 
9:36 AM
@NikiC Okay, will look into it then
@cmb Nice :D
 
I just saw weird behavior in PHP.
We can create a new object in the static method using new keyword but can not access $this variable. Any particular reason? I also read this at many places that we can not use $this inside a static method. But this behavior surprises me..
 
What's weird about this?
 
@Exception static function newThing() { $foo = new self(); $foo->privateProperty = 1234; return $foo; }
 
This is weird for me because I don't know that.
@beberlei Yes that I understand
 
$this refers to the object that a method is called on. In a static, there is no object, and hence, no $this
 
9:52 AM
But then why there is necessity to create an object inside static method itself. It should also be banished
 
No?
A static method is "just" a method which does not depend on the object
Basically it's like a normal function
And why shouldn't you be able to create an object in a function
 
@Girgias Because what I think is, if there is no access of $this (which actually represents object itself) inside static function then why it is allowed to create OBJECT inside static Function..
 
Why not?
Like the limitation you are tying to put in place makes no sense
 
@Exception a static method can create an object that has nothing to do with the class the static method is defined in
e.g. the Factory pattern
 
I am just trying to understand the actual reason behind creating an object (self or other) inside static method
 
10:04 AM
I've seen code with a static method that instantiates an object of a different class
From what I understand, static methods take a lot of thought and care in determining if the method should be static.
 
@Exception They're effectively named contructors. The benefit of being inside a static is they can access private / protected members of their own class created within them.

Let's say you have a really complex object representing something like a web request that has dozens of parameters.

You could pass every single one to the constructor, yeah it's viable, or you could have a named constructor that did something like:

static function FromSuperglobals(): Request { ... } that created a new request object, and assigned its private properties from superglobals, then returned it
 
that's something I miss in PL/SQL... it had named parameters...
I could skip passing arguments if the value was null
 
 
1 hour later…
11:22 AM
just doubt-
Which is good in terms of readibilty, speed and memory utilization-
`$eAllocation = $eventAllocationsData['allocation']['event'];`
OR
`foreach($eventAllocationsData['allocation']['event'] as $event) {}`
 
neither.....first, you have a typo in at least one name.
breaking your code down to one statement per line gives:
$eventAllocation = $eventAllocations['allocation']
$events = $eventAllocation['event'];

foreach($events as $event) {}`
and there's a mismatch between singular and plural.
But also, using objects and accessor functions would make that code easier to maintain.... probably.
 
I guess we can ignore grammar here in technical discussion..
 
hi guys :)
 
@Exception sure, because the computer being able to understand it is far more important than humans being able to understand it!
 
@Danack Hey you have split that single variable into TWO. I don't think that is necessary
indirectly you are asking system to consume more memory
 
11:28 AM
It makes the code more readable, is it necessarily no. But by the same token we could all be writing assembly instead of higher level languages
 
@Exception 8 gigabytes of ram, for 40 quid. aka what you said was dumb, and hopefully within 5 years time you will understand why it's dumb.
 
@Tiffany I still don't understand what named parameters solve, BTW...
 
Something something it's nice knowing what value to pass to the function corresponds to what argument
 
11:51 AM
@Ocramius you sound old. Next you'll be complaining about modern popular beat music.
nsf-sanity link
 
@Girgias that's already the case? :D
 
@Ocramius yes, which confuses me as to why its a popular demand
I know Python does it (but do we really want to follow Python)
 
They make things easier, particularly where optional parameters are present.....e.g. Rust-like cloning
$startPosition = new Coordinate3d([x=1, y=2, z=3]);
$endPosition = new Coordinate3d([x=7, ...$startPosition]);
Actually, since you're here and you were keen on the readonly RFC - @Ocramius what are your thoughts on making a case for structs by having them behave better than classes: github.com/Danack/RfcCodex/blob/master/… ?
 
12:09 PM
@Ocramius imho htmlentities($str, encoding="UTF-8"); is all the example you need :)
 
What about that? I'd rather say that I see some shitty API :P
Are we designing tools to consume shitty APIs? Because I can do that with reflection...
@Danack well, I'm all for more immutable structures
 
in that case, you can choose to ignore the reality that is ext/standard + other core APIs, but it solves any kind of parameter order phpsadness in a BC way.
:-)
 
Yes, that's feasible by adding new functions that extract those parameters away. Seems like X/Y problem in that context.
I mean: we could take anything in OpenSSL as a way to hurt ourselves :D
 
@cmb the ini setting xmlrpc_errors=on is not even connected to ext/xmlrpc i just realized, if you set this global ini setting, every error will be rendered as xml rpc error o_O
yay commit is from 2001 (!)
i keep digging up one grave after the other with thie error handling
 
cmb
@beberlei lol
 
12:20 PM
@Ocramius I used to work in a proprietary codebase that occasionally had four or more parameters, sometimes up to eight. Most of the time, I only needed the first two arguments, and maybe one or two arguments after that. Named parameters to the rescue.
 
@cmb essentially this feature is unchanged since 2001
 
In some cases, it was a function in Oracle code too
 
@Tiffany myHorribleApi(...MyParametersAsProperValidatedStructure#toSequentialParameters())
 
cmb
yes, I've seen that already, but wasn't aware abouts its far reaching consequences ;)
 
You can even design it so it skips passing any parameters if no default was changed in the "later" parameters, but 4 parameters already screams guillotine :D
 
12:22 PM
@Ocramius I'm speaking only in the case of that codebase and PL/SQL though. The proprietary codebase was a massive ERP for higher education institutions.
(Ellucian Banner)
it was full of genymdhms too... (twbkwbis, spriden, spbpers)
 
Yeah, need to keep them nms shrt
 
I think it was originally created in the 90s, when table names had a character limit
sometimes I miss working with it, but most of the time, I don't :D
 
DB2 still has this limitation somewhere IIRC
Right now having issues with MySQL's 63 chars limits sometimes :P
 
12:43 PM
@Danack Thank you man.. expected from you .. haha
 
1:16 PM
@Exception the TL;DR of it is worry about optimizations when things need optimizing, otherwise focus on readability for humans
 
@Tiffany (y)
 
It's either an intermediate TMP, or a TMP, both taking up the same space
 
cmb
@Derick, did you already start tagging?
 
no
what, again?
 
cmb
Today PHP 7.4.6RC1 should be tagged. I was asking because Nikita just reverted an errenous bug fix, but if you hadn't started, that's no problem at all. :)
 
1:42 PM
@Derick Oh. Well, that might be nice but I suppose optional, since it's made so easy. :-) Definitely happy to take suggestions, though.
 
@Crell Working on a way so that Xdebug doesn't have to punch through firewalls (with an SSH tunnel) to get to a local IDE
 
Ahhh... Nifty.
 
@cmb sigh :-)
but no, hadn't started yet
 
2:11 PM
@cmb "eventual" :P
Such German
 
@beberlei did the bot go crazy? twitter.com/PHPRFCBot
 
@Derick uh, I might have renamed a heading
 
@Derick its not my bot ;) but it looks like it
 
@beberlei I think we can blame @NikiC
 
does anyone know @michaeldyrynda ?
 
2:13 PM
Should I rename it back, or is that only going to make it worse?
 
i guess it'll do the same again
so just leave it :-)
 
+$func = fn(
+    $there,
+    $shouldnt,
+    $be,
+    $many,
+    $params,
+) => print "Foo\n";
hahaha
 
@NikiC not your problem to solve...
 
also, why am I getting all the php.net appveyor build failures emailed to me? :-)
 
So that you fix them, obviously. On a more serious note, probably because you are RM and should know when it's broken before tagging or such
 
2:16 PM
too many emails -> ignored
 
the CI tool that cried wolf
 
cmb
@Derick I assume that is somehow configured in the AppVeyor project settings (there's nothing in .appveyor.yml), but I don't have access to these.
 
yeah, I've turned it off for myself now
 
@beberlei wiki.php.net/rfc/constructor_promotion#attributes Does this look reasonable to you?
 
@NikiC oh tricky :-( i would only put it on the property, as thats what most likely the user intented, and if they don't then they shouldn't use property promotion
but i only say intended, because with doclbocks parameter attributes were not supported, only now they are
 
2:27 PM
@beberlei I think it should apply on both, if we then get to restrict attributes scopes (i.e. can only be applied to properties for example), then the attribute only applies to the possible scopes
 
@cmb Already seeing lots of buggy clean sections from the output ... Having a --CLEAN-- without <?php seems to be a favorite
 
@bwoebi no that won't work, because target attribute definition validations are lazy, at newInstance() time. it would throw an exception, instead of not appear on the lement
 
because you'll e.g. have psalm annotations which most likely will also make use of attributes … and then they wouldn't apply to the ctor which would be wtf
@beberlei ugh
 
@cmb Maybe we should make CLEAN without output an error, similar to what we did with SKIPIF. Of course, this means we'll need to add more @ to CLEAN
 
@bwoebi yes, validation depends on compiler vs userland attribute, userland is deferred until the last possible time
@bwoebi otherwise it would have to trigger autoloading on compile, which was universally hated as well :p
 
2:29 PM
@beberlei Yeah, I agree that this is the most likely intention
 
cmb
@NikiC yes, I think that would be good. (and I don't mind @ in clean or skipif sections)
 
i just realized that its confusing for IDEs and static analysis
 
@beberlei It just seems a bit odd to put the attribute on the parameter, and then it only gets applied to the property...
 
they need to know the desugaring rules.
is there precedent in C# for example?
 
I'm wondering if "no attributes on promoted properties" might not be better
 
2:32 PM
honestly probably yes, although that kills a few nice use cases
 
Can't that be moved to "Future scope"?
 
@beberlei What use cases does it kill?
Entity declarations?
 
@NikiC simple structs and ORM usage, this is only have the example, but think of ORM attributes here: gist.github.com/beberlei/050a321cad0294a0ade75ac9da7519b0
btw i had another minor detail that is going to be weird, since the RFC now has the PhpAttribute attribute requirement, there is essentially no way to forward compatible usage of Doctrine Annotations classes between php 7 with docblocks and php 8 with attributes, as you cannot put the <<PhpAttribute>> on the code without causing parse fail
unless you don't use newInstance()
 
@beberlei hrmpf
 
yeah i am probably needing to either change some details, or make an amend RFC
 
2:37 PM
@beberlei Will they be forward compatible anyway?
That is, wouldn't the structure for many be different because of limitations?
 
yes, only for simple mappings could you do it automatically
as soon as you have a nested doctrine annotation, you need to come up with a different approach with attributes
 
Erf I think I fucked up the logic in iconv for github.com/php/php-src/pull/5476
 
i am not particularly unhappy about this, as it avoids people doing super complex stuff in attributes, but it will be something peopel are going to request.
scroll to the middle here: symfony.com/doc/master/bundles/NelmioApiDocBundle/index.html the UserController code snippet has much nested doctrine annotations
 
2:53 PM
@beberlei Let's see if we can at least get named parameters
 
@NikiC how can i help? :D
 
btw I mailed the list regarding attributes and constructor promotion, as I don't see an obvious best solution
 
@NikiC I don't understand the post in internals: can you make practical examples?
 
@Ocramius which post
 
> btw I mailed the list regarding attributes and constructor promotion, as I don't see an obvious best solution
 
2:56 PM
@Ocramius did you check the link? the question is about where an attribute should end up with, when its on a promoted property, on both the property and the parameter that is generated from de-sugering it?
 
shame it can't nest:
public function __construct(<<Promoted(PromotedAttribute(...))>> public int $x) { ... }
 
@Ocramius I've added the possible results to wiki.php.net/rfc/constructor_promotion#attributes now
 
@beberlei indeed, darn. NVM, all clear /cc @NikiC
 
@NikiC ah much better than my rambling with commas set at the wrong places ;)
 
Out of the blue, without thinking much about it, I'd guess: on the property only
 
3:08 PM
I would aim at both, since that's what that parameter declaration means :shrug:
 
 
1 hour later…
4:33 PM
Gosh this namespace thread is making me hurt
 
5:02 PM
@Girgias Thinking about the mess that is PHP naming will have that effect.
 
I know and I still decided to venture in that place >-<
 
user10141648
Hello!
Is it possible to get only the day of a datetime-field in the database, in PHP?
 
Why not use the proper date type for that?
 
user11867329
What's a free and smart way to manage email accounts from your server
 
user10141648
I do this
 
user10141648
5:17 PM
        die(date('D', $row['date']));
 
user10141648
and it works
 
user10141648
but it gives me also this error on the same line:
 
user10141648
Notice: A non well formed numeric value encountered in /Users/merdin/Desktop/untitled/index.php on line
 
@Merdin: What's the value of $row['date']? Note that, as per the documentation, date() takes a unix timestamp as its input. You may want to look at DateTime::createFromFormat() if that's not what you have
 
@beberlei If you want to see an abuse of Doctrine Annotations, look at Drupal 8. :-)
 
user10141648
5:21 PM
@AllenJB it is datetime (mysql db) like i said. So yyyy/mm/dd HH:mm:ss
 
user10141648
So I need to convert it first to a unix timestamp?
 
@Merdin You are missing the point
DateTime is a PHP class
 
user10141648
ikr
 
user10141648
i think i found it tho
 
user11867329
Seriously, I need to learn how to handle a dozen email account user (per domain)
 
user11867329
5:29 PM
isn't it possible to host your own emails?
 
@NikiC Huh, I didn't realize that parameters could have annotations in the first place. Are there use cases for that?
 
user10141648
is this the room for questions like that @OakDev ?
 
user11867329
Yeah sure, my whole thing's using PHP. As PHP users, you surely had to handle email managing for a custom domain(?)
 
user11867329
info@yourwebsite.com
 
user11867329
user1@yourwebsite.com
 
user11867329
5:31 PM
user2...
 
hey, I have a question. is it possible to write a code in PHP which download apk from play store like this python repo on Github? github.com/rehmatworks/gplaydl... I never tried something like this.
if yes then give me some hints
 
@AllenJB PHP's DateTime constructor understands the MySQL format by default, no need for ::createFromFormat
 
Meh. I prefer to be precise - if you use ::createFromFormat and the format ever changes (possibly to one that's sometimes parsed incorrectly), you'll get an error instead of Fun
IMO you should always use ::createFromFormat when the input format is known
 
5:52 PM
@OakDev yes
If you really want to ru your own webserver you of course can
 
@GabrielCaruso you wouldn't have a problem with waiting for the mixed return type RFC being voted on first before the magic methods one would you? As then the doc block types can be changed to actual types, right?
 
user7575848
hello
 
user7575848
How to get printed result as string array : foreach ($response->getResults() as $result) {
/** @var GenerateKeywordIdeaResult $result */
// Note that the competition printed below is enum value.
// For example, a value of 2 will be returned when the competition is 'LOW'.
// A mapping of enum names to values can be found at KeywordPlanCompetitionLevel.php.
printf(
"Keyword idea text '%s' has %d average monthly searches and competition as %d.%s",
$result->getText()->getValue(),
is_null($result->getKeywordIdeaMetrics()) ?
 
user7575848
the return i'm using is not working
 
6:08 PM
Joe has been quiet in here lately, anything he was up to?
 
@bwoebi dunno, but he has kids, so maybe spending more time with them given the situation?
 
user7575848
please who can help me
 
> the return i'm using is not working
If you put a Short, Self Contained, Correct (Compilable), Example on 3v4l.org it would be easier to give help.
Though by the time you've made an example, you'll probably have figured it out.
 
user7575848
how to return result which are printed here : printf(
"Keyword idea text '%s' has %d average monthly searches and competition as %d.%s",
$result->getText()->getValue(),
is_null($result->getKeywordIdeaMetrics()) ?
0 : $result->getKeywordIdeaMetrics()->getAvgMonthlySearches()->getValue(),
is_null($result->getKeywordIdeaMetrics()) ?
0 : $result->getKeywordIdeaMetrics()->getCompetition(),
PHP_EOL
);

return
 
user7575848
need to return only this part '%s'
 
6:22 PM
oh....you're asking how to return instead of printing to output?
 
user7575848
yes
 
Beunos Tardes
 
user7575848
to return like : "a,b,c"
 
s + printf = string printf - php.net/manual/en/function.sprintf.php
@StatikStasis I am not.
 
user7575848
6:25 PM
sorry i'm begginer in php
 
user7575848
can you help me how could be in this case
 
Read again your question here and Danack's answer. Can't be explained differently.
If you need just values without formatted text, it is already there - in 2nd, 3rd and 4th parameter of printf function. Just use it as per need. @Alia
 
user7575848
Keyword idea text 'a' has 1600 average monthly searches and competition as 4.
Keyword idea text 'b' has 10 average monthly searches and competition as 2.
Keyword idea text 'c' has 10 average monthly searches and competition as 4.
 
user7575848
this is how is printed
 
user7575848
i want to return like "a,b,c"
 
6:37 PM
You can use it. Have you checked printf function in docs and what are arguments/parameters there and how string has created from it?
'a' is $result->getText()->getValue() and so on...
 
user7575848
maybe i have to store in one string and to return that string
 
@Crell re parameter attributes: request to controller param converter, di injection, to name two use cases
 
user7575848
could you help me with it
 
Sure, ask on SO and I'll answer if someone doesn't answer first.
 
user7575848
@Tpojka please if you can i will appreciate
 
6:43 PM
 
user7575848
-1
Q: How to return result printed in php

AliaI want to return the result printed , to use in other function. Here is the code: "Keyword idea text '%s' has %d average monthly searches and competition as %d.%s", $result->getText()->getValue(), is_null($result->getKeywordIdeaMetrics()) ? 0 : $result->getKeywordIdeaMetrics()->getAvgMonthlySe...

 
Done.
Actually probably is wrong since question is wrongly written. I think you have some loop there which is not shown in question. Please read this article before you edit your question accordingly.
 
user7575848
thank you
 
@Danack I would. I'll hold it, no problems.
 
7:29 PM
I wouldn't* :S
 
7:55 PM
Oh shit: https://github.com/php/php-src/commit/aaedcb116cec90eaa81e187410a9cfdfeb1770b5

How?
 
8:07 PM
They got the patch version from your PR and applied it
 
lol
 
Wes
can we nuke git and start over pls
 
8:22 PM
@Wes rm -rf .git; git init
 
Wes
you know that's not what i meant :P
 
@Derick https://externals.io/message/22174#22184
Do you still hold the same opinion? I think this would be pretty nice.
```
outer_loop: while (true) {
while (true) {
break outer_loop;
}
}
```
Much better than `break 2;`. `goto` isn't allowed in many companies and is also hard for static analysers to understand.
 
8:41 PM
Did goto get added with the RCF process? Cause it's pretty "recent"
 
can anyone tell me if that makes sense at all? why would destructors not get called when a SoapFault is catched and script stops?
 
SoapClient.... that's easily in the top 3 of most stupid shit in php
Not an answer I know. Just an observation :P
 
8:56 PM
@beberlei soap uses bailout based error handling
 
@NikiC i know trying to port the code to display callbacks, but doesnt work with bailout
why does it need to use bailout?
 
@beberlei It doesn't need to use them, someone just implemented it that way
Actually, that someone is probably Dmitry
It would be great to exorcise the bailouts, but that's probably a good bit of work (which should be fairly mechanical though)
 
i have it fixed, except that test
 
@beberlei wait, is your question why the foo destructor shouldn't run?
destructor only runs if constructor finished successfully (did not throw)
 
that might be new, the test exmaple is from 2007, so might be out of date the orignal premises ;)
 
9:14 PM
ah ok i got it backwards, when i dont call zend_bailout anymore, then destructors are not called anymore. curiouser and curiouser
 
@NikiC about the ZPP macros, can I merge the zend_object one, or do you want me to convert some which use the Zval version to the zend_object first? (because I'm confused by one bit of array_columns in the string|int union ZPP PR)
 
9:49 PM
@Girgias do you mean goto functionality, or usage? Because IIRC, goto was added by Sara at a conference while someone was giving a talk lamenting the lack of goto support in PHP
 
Functionality, was added in PHP 5.3 IIRC
 
@Girgias If you want to call 11 years recent then yes :)
 
I mean, it wasn't built in
 
@PeeHaa o/
 
Does anyone know about: grokk.io ?
 
9:54 PM
@Girgias I couldn't find an RFC. There are RFCs for PHP 5.3 on wiki.php.net but not this one.
 
@Girgias she added the functionality in half an hour. Ask @DaveRandom for the story.
 
I mean I don't imagine it to be that complecated to add, as the VM from what I saw is already just a massive jump table
 
@IluTov RFC process only really started with 5.4
 
@PeeHaa So I streamed Saturday night for 2.5 hours. After 2 hours my stream disconnects. I wasn't sure why so I restarted it. I then check my email and see that I was given a warning for a community guideline violation. Nothing occurred that would violate guidelines. The only thing I can figure is I was at the part where you are cross dressing in order to get to Don Corneo and maybe a bot picked up the words and did an auto removal...
@PeeHaa I did an appeal and my video was restored... but only 30 minutes. I lost 2 hours! I'm going to have to replay that part again... sigh...
 
@beberlei that was when there was a bunch of BC breaks :D and my former employer was stuck on 5.3 in perpetuity
(read: I was stuck trying to rewrite it to work on a version other than 5.3)
 
9:58 PM
hello guys, please I need some help on email sending. Here is my problem, I am trying to send an email to a user from my site to the user's gmail account but for some reason the hyperlink and image tag is not displaying on gmail. Please what could be wrong.
 
@beberlei Wasn't 5.4 when all the backporting from PHP 6 into 5 started too? Because the failure if PHP 6 was starting to become apparent?
 
@NobMusic do they work with other email clients?
 
@Tiffany i have not tried that yet boss
 
Like Hotmail, for example, or Outlook
 
no I have not
most of my mail listing are gmail
but gmail gets the image and hyperlink ripped off
 
10:02 PM
Test it out. It may not be an issue with Gmail.
 
is there any other way to specify an image except the img tag ?
@Tiffany
 
@Girgias i wasnt active in intenrals at that time, so i wouldnt know well
 
Fair :)
 
because I have tried that for like 10 times now @Tiffany
 
I don't know enough about adding HTML in emails, but if the issue persists across other email clients, then there may be something wrong with your code, and that will help you with googling
 
10:06 PM
@Girgias already with 5.3, but yeah most landed in PHP 5.4
 
Okay, thanks for confirming :)
 
@StatikStasis What a fucking bullshit
What rating did you attach to your channel/videos?
 
@PeeHaa It's rated as "not being for children" so it should not have affected it.
I was told due to YouTube being short staffed during this time there have been a lot of false positives by bots.
 
Ah rite
 
10:22 PM
So for C++, referencing twitter.com/rasmus/status/921520204365971456, do currency calculations usually get processed as integers (ex. $100.10 = 10010) or do they use floating point but ensure to handle the rounding before storing as decimal or numeric in database?
 
For the sanity of everyone alive, monetary values should be represented as integers
The only issue is currency conversion (like £ to $)
 
I store prices (fixed two decimal places) as Decimal in database. But for our purposes there isn't any currency conversion.
Am I a monster?
 
(yes)
 
I mean decimal in a DB is okay because it should handle it as integers anyway, only question is how do you get that value in the programming language of your choice
 
10:26 PM
Interview tomorrow morning, nervousness setting in, eeeeeeeeeee
 
Well- currently it is only used in PHP for my purposes.
@Girgias In other languages for displaying to user do you just divide by 100 and display or use a specific function to print the value as intended like sprintf in PHP?
Never had an issue since I have stored as decimal. Just curious.
 
I'd use a library...
 
@Tiffany Gooood luckkkkk
 
Cause some currencies don't have decimals (e.g. Japanese Yen)
 
This is true. I'm just thinking for USD since not used internationally.
 
10:33 PM
@StatikStasis moneyphp.org/en/stable/features/allocation.html - you have to use specific bits of math to avoid fractions in the first place.
 
Oooohhh saving this.
The only math for currency that is necessary in my app is price_per_unit * qty_ordered. But if I ever have a need to divide this will be useful.
 
10:52 PM
Good point. Definitely not doing that.
 
01:00 - 23:0023:00 - 00:00

« first day (3482 days earlier)      last day (1465 days later) »