« first day (3424 days earlier)      last day (1746 days later) » 

00:06
@Girgias You do really need to write to the list about that new CSV extension. Once you've done so, ping me and I can approve
I'm still working on it ATM trying to write a new function for it
Will write to it before going to bed
that's fine, I'm off to bed now
ping me during the week if I haven't seen it/approved it
00:42
@Sherif breaking stuff, gosh
I giggled at the broken build email
ah bugger almost 1am, goodnight all o/
01:12
@Tiffany shhh... nobody saw nothin' ya heard
 
2 hours later…
02:56
@Sherif ya heard with Perd
03:44
@Tiffany age-weighted reference noted
04:11
@MarkR added file -> collection and collection -> file, and on that note I'm going to bed
 
6 hours later…
09:47
90% of the news are about coronavirus and we have just 3 cases in this corner of the woods....
 
1 hour later…
11:02
@Sherif this next noise I will make, is a laugh
11:35
morns
11:48
hi guys
i have a question
i want to get the data of current week in mysql
i got this, and worked fine
WHERE yearweek(DATE(`date`), 1) = yearweek(curdate(), 1)
but in that query the first day of the week starts from monday
but i want the first day of the week starts from saturday
any idea?
Thanks in advance
1
Q: How to populate data in html table with both side header

Eniolhow can I populate data in html table with both side header fetched with PHP and MYSQL. code $query = $db->prepare("SELECT 'cricket' sport, player, score FROM cricket_table WHERE dateby BETWEEN '2020-01-01' AND '2020-03-01'" UNION ALL SELECT 'football' sport, player, score FROM football_table W...

English plz
 
1 hour later…
13:06
Any objections to me moving get_debug_type to voting phase?
Seems fairly open and shut.
13:20
@MarkR gogogog :o
Maybe this one will pass, my last one not so much xD
wiki.php.net/rfc/get_debug_type I think I got that voting table right
@MarkR it doesn'T show me options to vote
ah CSS fail
In the voting section at the bottom you don't get the table?
just very hidden
ah gotcha
13:31
@MarkR I helped :P
13:46
Crash with pcov extension enabled ・ *General Issues ・ #79327
 
1 hour later…
14:49
@PeeHaa did you test these methods before while you were writing them? if so, how? github.com/async-bot/linux-manual-pages-plugin/commit/…
thanks
so errr... reading an answer about sql transactions just now and... (don't judge I've never used them) we need to manually roll back? So like, if one commits queries that throw an error, everything basically stays fucked?
I would have presumed that dbms would automagically rollback
@FélixGagnon-Grenier they do roll back if the connection closes afaik
ok. I was looking at this answer from feed stackoverflow.com/a/60476517/576767 and I found the same vibe to the try catch around transaction commit as that of mysql_query() or die()
maybe I've grown an unhealthy hatred for things I must do manually
(figuratively manually, that is, I'm ok with hammering stuff)
15:33
I rarely use transactions, but I've found that making yourself a little closure helps.

$db->transaction(function($db) use (...) {
// your db code goes here
});

That way you've got a single function where you can begin a transaction, end a transaction, and if you throw during it, roll it back.
@FélixGagnon-Grenier you're becoming a lazy programmer :P
@MarkR nice
@Tiffany :B
@FélixGagnon-Grenier Difference being you can do it at a higher level instead of wrapping all calls
yeah... it also comes to mind that manually actually reversing the effect of queries (writing contrary sql) is way more bothersome than a rollback command :)
16:06
Typo in filter.filters.validate documentation ・ Documentation problem ・ #79328
@PeeHaa had to fight off a headache before I could continue ... I want to test a couple getters I wrote, did you add something to your temp test file, or just went with writing unit tests?
Both
If it's really just getters for some domain object I would just test it and use them while developing
wrapping my brain around how to do it
@PeeHaa did you make the getters public to test, then changed to private?
underlying question: is it okay to do that?
16:34
No
You always test through the public api
Retriever = public API, Parser = private API?
17:13
nandgame.com is awesome
Need help with DST ... I'm in CET/CEST, DST will be active on 29.3 from 2:00 and jump to 3:00 then ... How do I get the correct number of days when considering timestamps in between these two days. I have a timestamp (from DB) which points to 29.3. 00:00 - and I want it to be correct on midnight 30.3.
root@bobtop:~# php -r 'var_dump((new DateTime("2020-03-29"))->diff(new DateTime("@" . strtotime("2020-03-28")))->days);'
int(1)
root@bobtop:~# php -r 'var_dump((new DateTime("2020-03-30"))->diff(new DateTime("@" . strtotime("2020-03-29")))->days);'
int(0)
(strtotime("2020-03-29") is the input, cannot change that, just for testing purposes inline in the expression)
@Derick maybe you have some idea how to correctly use DateTime for these purposes :-)
actually, new DateTime("@" . date("Y-m-d", $inputTime)) would work - but that's weird :-D
I basically cannot find any reference on how to properly handle date differences with respect to DST in PHP
IT doesn't help there is the odd bug here... bug, you're doing the calculation the wrong way around. diff() returns the value how to get from the object it got called on, to the value in the diff() argument
but, if you're using strtotime() already, you're losing timezone information, so it can't calculate this correctly
dates created with @ don't use the date.default_timezone afaik
my local timezone is configured to be Europe/Berlin
@bwoebi that too
17:23
strtotime respects my timezone and DateTime is using the same tz
dpm
don't mix them, you're going to get pain.
anyway, I have a timestamp 1585436400 stored
which is equivalent to 29.3 midnight CET
and I want to find the difference between that timestamp and a given day in future
if you want to use diff(), you need a DateTime object with a real timezone attached
using @... won't do that
not even setting a second argument new DateTimeZone will do that, and if you use setTimeZone later it can also produce weird results
you should do $date = new DateTime(date('Y-m-d H:i:s', $timestamp), new DateTimeZone("Europe/Berlin"));
using setTimeZone should work
17:26
only if the offset is the same as the dates offset or?
@beberlei so the actual way is actually going back and forth by first converting it via date() and then passing to DateTime?
which sounds backwards, essentially doing it twice
the problem is that you store unix timestamps in the DB ;)
a datetime created from @ for me always produces the timezone as:

public $timezone =>
string(6) "+00:00"
yeah, I just saw the note in the docs
weird behavior (in my eyes)
> The $timezone parameter and the current timezone are ignored when the $time parameter either is a UNIX timestamp
so there's no way to construct a DateTime object directly from unix timestamp in the current timezone - but the detour via date() is necessary
might make a good addition ;) DateTime::fromUnixtime(int $ts, DateTimeZone $tz);
@beberlei I wish to hear @Derick opinion on that first
cmb
cmb
17:49
(new DateTime("@1585436400"))->setTimezone(new DateTimeZone('Europe/Berlin'))
yes, what @Cmb writes
(new DateTime("@$timestamp"))->setTimezone(new DateTimeZone(date_default_timezone_get()))
in the end then
really feels like it should have a more intuitive way, but okay.
It's sort of intended, as you really should stop using timestamps ;-)
and/or default timezones
@Derick the neat thing about unix timestamps is that you can usually compare them easily without having to convert to DateTime first etc.
It's maybe the cleaner way, but not the most straightforward way
if using actual timestamps would be easiest to handle in code, then we would probably use actual timestamps as well...
@NikiC about wiki.php.net/rfc/token_as_object, it would be cool to have __toString, but that'd be a bunch of extra work. I guess it can be extended in userland to have that
18:01
@Andrea what would __toString even output? The token name? The value of the token? A mix of both? (Like T_SL: <<)?
 
1 hour later…
19:09
@cmb I think you saw my implementation about the float-string cast stuff... Do you think it would be possible to simply make the "G" formatting specifier locale-independent (and eliminate "H"altogether), given an RFC was accepted of course? I couldn't find any usage where doing so would cause an issue.. or maybe the Zend API function zend_locale_sprintf_double() is a problem?
 
2 hours later…
20:52
@Derick mailed your php.net address, let me know if that's not the best thing/anything else required. Presumably there's a "correct" ml for this sort of thing in future? Don't like bugging specific people for general stuff if possible :-)
also I guess ^ /cc @cmb if there's other stuff missing that you know of, presumably not much work to add a few at same time vs doing them separately
The PECL section could probably do with pruning a bit, there's a lot of stuff in there that's long dead (runkit) or has a top-level category for it (zip, json), the latter of which has been fully absorbed into core
obv auditing that is a massive exercise though, not suggesting anyone do that now and there are definitely higher priorities :-P
I suspect in a lot of cases PECL bugs are much better served by github issues, numerous times I have had to contact the maintainer of a PECL ext just to ask where to report a bug so it will get dealt with - generally that results in it being handled directly by them in back channels, which is both unsustainable and doesn't provide any public visibility to prevent duplicated reports :-/
21:48
Hi! Who support edit.php.net? It does not work past two weeks. Always ERR_TIMED_OUT.
cmb
cmb
21:58
@rjhdby I suggest to file a bug report
@DaveRandom FFI (PECL/ffi isn't really suitable) and the mentioned fileinfo would already be helpful.
@rjhdby when doing what, specifically?
cmb
cmb
edit.php.net timed out for me after logging in, or even on first access.
@DaveRandom Usually when open first page. Time to time first page loads, but login is breaks with time out
@rjhdby if you have a specific patch I will commit it directly through svn in the morning
22:14
@DaveRandom I can do it by myself if needed, but online editor is more comfortable for me.
@cmb yeh, I've managed to get a bit further by manually cancelling a few pending request, now got a msg I've never seen before about a "global update in progress", dunno if maybe the recent work by @heiglandreas re. git migration may have busted sth?
e.g. some sort of deadlock at the back end
@rjhdby agreed :-)
cmb
cmb
These global updates are supposed to happen every 4 or 6 hours, and should take less than half an hour IIRC. Might indeed be issues due to the Git migration.
{
    "ping": "pong",
    "updateData": "StaticRevcheck",
    "totalData": {
        "topicInfo": {
            "content": "<p style=\"font-size: 12px;\">Welcome to <font color=\"#ff0000\"><b>PH</b></font>P <b><font color=\"#ff0000\">D</font></b>ocbook <b><font color=\"#ff0000\">O</font></b>nline <font color=\"#ff0000\"><b>E</b></font>ditor !</p>",
            "author": "yannick",
            "topicDate": "2014-06-19 17:44:10"
        },
        "lastInfoDate": "2020-03-01 14:36:09"
    },
    "success": true
(posted because "updateData": "StaticRevcheck" and "lastInfoDate": "2020-03-01 14:36:09" seem like maybe useful debugging info for someone who knows what they are doing :-P)
22:30
.... font tags ..........
My eyes hurt
 
1 hour later…
23:30
@PeeHaa I'm a dunce, I didn't realize the array would call the member methods
23:52
@bwoebi I was thinking it would attempt to reconstitute the token in such a fashion that you could turn the sequence of tokens back into source code. Like a T_STRING would return '"hello, world\\n"'

« first day (3424 days earlier)      last day (1746 days later) »