« first day (3989 days earlier)      last day (945 days later) » 

12:03 AM
I've read parts of the manual, but it doesn't help me for PHP extensions because I don't understand how it interacts with the rest of the system.
I put in things I think will work, but then they don't.
 
12:30 AM
To quote a dear departed old friend, "It's like the Necronomicon, you peer in thinking you'll unlock secrets of the universe, but come out a babbling idiot."
She was speaking of the sendmail config, but that was also m4 based...
 
Nov 23 '20 at 20:44, by Danack
It's a trick. They're trying to get you to look at m4 files. Get an axe.
 
@Danack well played. I almost started reading it.
 
IIRC the chapter on m4 files in my book is basically: "Look... You really wanna know? Go buy a book on M4, in the mean time use these handful of lines which cover 90% of your needs."
 
 
2 hours later…
2:17 AM
Ok so, I try really hard to keep an open mind, but wtf are these quotes For example, ‘example(`a')’, ‘example(a',1')’, and ‘example(a',1',)’ [...]
are these really backticks and single quotes actually wrapping a value?
(I might have clicked on in the m4 manual...)
oh. nvm my rash overreactions.
 
2:58 AM
I need to rewatch the Mummy
 
3:12 AM
http_response_code() does not override the status code generated by header() ・ FPM related ・ #81451
 
 
1 hour later…
JRL
4:20 AM
dammit, i really wish i had a bottom type right now
collections are so clunky without them
 
@JRL s/a bottom type/generics
 
JRL
yeah, but that's never going to happen really, whereas the only thing stopping a bottom type is that people think other people will use it "wrong"
 
At this point if PhpStorm finishes out their support so it actually works beyond the simplest of cases, I'll probably be happy.
 
JRL
there would still need to be a transpile step or a type deletion step
 
PhpStorm's support is purely docblocks. Transpiling them away would be another option.
github.com/phabelio/phabel PHP transpilers can do some interesting things now.
 
4:57 AM
Generics won't happen soon, but I'm not convinced they'll never happen. The CLR that runs Microsoft languages is pretty amazing, and has reified generics in the IR (it's not erased). I think there are techniques we can learn from them.
 
 
3 hours later…
7:57 AM
It's friday, my friends. 10 years pass
 
 
1 hour later…
9:00 AM
if comparison with '==' operator between integer and a string ・ Unknown/Other Function ・ #81452
 
JRL
that's... why?
don't do that
 
8.0 already does what the user wants anyway: 3v4l.org/GcpJ6
 
9:47 AM
Guys one info
but the static clousure return from a class instance in the same always?
or alloc new memory ? where I find the portion of code in php-src ...
 
@BruceOverflow new memory
 
Oh my good! ok
@NikiC In documentation is written?
 
10:09 AM
So isn't possible to remove the allocate memory
 
10:53 AM
@cmb I can't really import that version of timelib, as it changes/adds some features, so the quick fix seems like a good idea? I don't expect to pull in further versions of timelib into 7.4.
 
cmb
I'm fine with that. You may want to comment on the PR :)
 
Ctrl-C. Ctrl-V'ed
 
11:10 AM
Hello All
can anyone tell me where can i find oci8 PHP extension for linux
 
yes @cmb it helps
but I need to download php-oci8-5.4.16-48.el7.rpm
sorry php-oci8-5.4.16-48.el7 this version
 
PHP 5.4 is no longer supported, and hasn't been for years.
 
ok
we installed
php-pdo-5.4.16-48.el7.x86_64
and when I am trying to install php-oci8-5.4.45-18.el6.remi.x86_64.rpm
it throughs error
 
11:31 AM
php -v outputs what?
 
And what error does it throw?
 
php 5.4.16
 
11:51 AM
oof
 
How the fuck is PHP_RSHUTDOWN_FUNCTION(streams) registered????
 
@muniya why 5.4?
 
@muniya are you doing this for work, or are you following a really old tutorial?
 
this for work
actually linux 7.9 version doesn't support php 7
 
Is it a legacy code base that was written on 5.4 and never refactored?
@muniya that sounds like bullshit, but I need to verify
 
12:01 PM
@Girgias ext/standard/basic_functions.c:549 (on master)
 
@MateKocsis bleh
I was looking for it
Because it is defined in main/streams/stream.c and was like where on earth is it
 
what are you working on??
 
Stream Context resource to object
And I'm hating it already
 
ahh, nice! I was hoping for something similar! Good luck :)
 
12:06 PM
@muniya ok, you're pretty clearly not getting the support you need from your colleagues....being left to figure out how to install stuff yourself, when it's apparently out of your depth is a crappy situation to be in.
You should have a chat with who you work for, to get the support you need.
 
12:39 PM
Can anyone suggest any links to guide/tutorial for implementing PSR 7/17/18 in a PHP app? Am struggling to understand how this concept is utilised
The interfaces versus the counterpart factory interfaces don't seem to match up. Like RequestFactoryInterface method createRequest() receives $method and $uri, but the RequestInterface has much more data
 
12:58 PM
@PeeHaa when the build is successfully updated , the 'released on' date (when you hover over the version) is updated as well. In this case - you seem to have found an issue because master hasn't been updated for a while - I'll look into that
 
JIT (tracing mode only): Undefined array key ・ JIT ・ #81453
 
1:27 PM
Gah, Pierre has started "contributing" again
Amazing how much consistently bad advice he manages to give
3
 
I'm consistently unable to compile php since a few days :/ and I'm not out of memory, I have 8G with 6 available
php-src-master/ext/phar/util.c -o ext/phar/util.lo  -MMD -MF ext/phar/util.dep -MT ext/phar/util.lo
virtual memory exhausted: Cannot allocate memory
Makefile:919: recipe for target 'ext/fileinfo/libmagic/apprentice.lo' failed
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
 
@Sjon you've presumably tried from a fresh checkout to eliminate weird stuff?
Also....rebooted that machine?
 
@Danack it should be fresh but I'll verify
I might try the windows solution as well
 
What -j setting are you using btw - as apparently en.reddit.com/r/linuxquestions/comments/a3s024/…
 
1:45 PM
I have to check - but unfortunately the reboot seems to have fixed it already
 
> unfortunately
 
:P
thanks for the idea
@Danack that was also correct and needed fixing - as this runs as a bg job it should be -j1 and it wasn't
 
I am so behind on internals
but a break every now and then is nice
 
@NikiC years of practice?
 
@NikiC Where this time?
 
2:07 PM
Morning all and Happy Friday!
 
2:19 PM
Good morning folks
Does this code give performance boost if number of array elements are too long
https://3v4l.org/ErBKH
 
cmb
@Exception I think a bit, but count() doesn't actually need to count the elements of the array, since this number is already stored in the HashTable. Usual advice: write for readability, and optimize when necessary.
 
yeah! that's my question like does for loop every time count the number of element in the array..
 
> count() doesn't actually need to count the elements of the array, since this number is already stored in the HashTable.
an array is a HashTable underneath.
 
3:26 PM
@Sara so, I'm trying to move stream contexts from resource to an opaque object, and I think I'm mostly there (somehow) but I've got a memleak and I can't track it down, any advice ideas? (for reference the branch is github.com/Girgias/php-src/tree/stream-context)
 
3:42 PM
@cmb My solution is to simply ignore what he says.
 
3:57 PM
@Tiffany rhel 7.9 doesn't support php 7. I requested to install PHP 7 but linux team said rhel 7.9 doesn't support PHP 7
@Danack nobody will help me cause it's not their job
 
It isn't ours either ;-)
 
Not having a process to on-board new team members, leaving them struggling to get a working development environment is a really bad thing for a company to fail at. You should talk to your boss about this....
 
Syntax for using traits is really weird. For example: `use A, B { foo as bar; }`

1) Why is the semicolon inside and not after `}`?
2) Why I can't write `use A, B { foo as bar; }, C`, and only the last trait is allowed to have modifications?
 
4:21 PM
Same answer for both, traits were added before RFC voting, and before voting a lot of stuff was committed without enough scrutiny.
probably.
 
I create a DTO that implements PSR ServerRequestInterface, and a factory class that implements PSR ServerRequestFactoryInterface to create the DTO. The properties that the factory method takes in is not enough to satisfy the methods/data in the DTO as defined by ServerRequestInterface. What am I doing wrong?
 
Guys but the lambda function are less performant than the named function in PHP I think yes but in PHP 8 the same?
 
4:39 PM
@James Having your DTO be a request object. It should just be a DTO.
 
@OndřejMirtes 1) because there may be more than one trait adaptation
2) little known fact, trait adaptations apply to all used traits. use A; use B { ... } and use A, B { ... } are the same
 
CLion users: any way to configure it so that, e.g. a zend_string * foo would automatically show up as (char *)foo->val in the watch list panel?
 
cmb
@NikiC the semicolon could be used as separator instead of terminator, though (like in for clauses), couldn't it (and I think it could be a comma instead, but that ship has sailed)
 
4:59 PM
@cmb that would be pretty weird though
We usually have semicolon-terminated statements inside {} blocks
 
cmb
oh, right
 
@NikiC Group use has left the chat
No one likes those :-P
 
5:22 PM
@NikiC Does it mean that the adaptations apply to A as well? Otherwise I don't get your point.
 
@Trowski but then the factory returns an instance of MyDtoName not ServerRequestInterface
(asking not arguing)
 
Why does it need to be an instance of serverrequestinterface?
 
5:40 PM
so that the class that sends the request expects that object. My understanding is that is the point of psr 7 etc, to create and use the same objects so no matter what http client is used the same objs/interfaces are expected?
 
sends the request?
It's for server side requests
For example your controller receives a ServerRequestInterface
 
^ e.g. it could be more verbosely named as ServerSideOfRequest or ReceivedRequest
 
5:59 PM
If you're sending a request, you probably want RequestInterface, assuming you're using something like Guzzle.
 
omfg
I nearly forgot
10th anniversary TODAY
 
Did you rewatch the video in honor of this momentous occasion?
 
6:09 PM
no tho I am now and did last week when I realised... also credit for actually noticing goes to @sectus
 
6:35 PM
Ok so if I told that the: Closure like $a = static function() {}, allocates new memory (Internally it's just another class type with custom handlers)
And this memory it's deallocated after that script is finished it's correct?
Or this memory it's deallocated with the same rules of the normal variable?
 
it creates an object which is refcounted like any other object
 
@DaveRandom Ok, so the static keyword it's only to bind or not bind the $this (scope), not the same semantics of the static member of the class or static var inside a function... it's correct?
 
correct
 
@DaveRandom Happy
 
:-)
 
6:39 PM
I understood another mechanism of this language :-)
 
note that you can still have a use() clause in a static closure, it doesn't stop you binding things from the outer scope, it only stops the implicit bind of $this
 
append #.jpg to the URL for oneboxing without download/upload :-)
 
sorry, couldn't resist with the "contravariant"
 
6:45 PM
it's regex based
 
cheers
 
@Tiffany lol finally something that legit 98% of people can't solve... I don't even know what some of those notations means :-P
 
blah
I might jsut move that one to the trash
shrug, if that's annoying, move to trash
 
append #friday to the URL for flipping the bird and not caring
 
JRL
@Crell hey, just to let you know, I should have the patch for the sorting enum finished sometime in mid-October.
I'm spending this month moving, and work has also been rather busy, and I'm having to break up my mental load a bit so I'm spending some time working on an event-loop simulation framework for PHP
Which is honestly a very interesting side project
 
7:36 PM
@JRL Event-loop simulation framework?
 
error_reporting() and ini_get('error_reporting') can get out of sync using @ ・ Scripting Engine problem ・ #81454
 
JRL
@Trowski Yes. It's a framework for running simulations based on React.
instead of a framework for serving websites
 
@JRL Ok, so using an event loop in PHP, not re-rolling one.
 
JRL
oh no, that's a "solved problem" in PHP
 
Might I ask why ReactPHP? (you know I have to ask)
 
JRL
7:45 PM
i used it previously for work, so i don't have to spend time learning amp or swoole
 
Fair enough. Mostly asked because I'm always interested in outside perspectives on features or UI.
 
JRL
as for why my work chose react, at the time it was literally the only event-loop library in existence for PHP
 
Well, the only noteworthy one I'm sure. Amp has existed for some time but didn't really shine until after PHP 7.
 
JRL
this would have been 2013
so im not sure
it was the only one i could find
 
Oh wow, ok, touché. You may be right.
 
JRL
7:48 PM
that was an intensely interesting project
there wasn't a websocket library for react back then
so we had to roll our own
which meant doing some binary parsing/implementation of the network layers
 
React was pretty young in 2013, and PHP still had some long-running process issues to resolve, so that was daring.
 
JRL
it was
the garbage collector had literally just been added
to PHP that is
it's the only reason we even attempted it
it was a micro-services websocket application for a mobile application, the idea being that we could create concurrency and performance while created a push oriented UI for both mobile and desktop
 
@DaveRandom fyi Rebillet approaches... twitter.com/marcrebillet/status/1438867673140584450
 
I was thinking you must have been using the websocket from a controlled environment, browser support was lacking at that time.
 
@Danack I'm still off indoor gigs, sorry :-/
 
JRL
7:54 PM
as for why, in 2013, we decided to do that in PHP instead of Node? well, devs are more expensive than servers early on, and our team had more PHP experience. plus, we were using react to basically attach instances of our application to logical CPU cores to do what was basically on-chip load distribution.
 
s/indoor// mostly
 
JRL
PHP was slower at that type of application overall than Node, but Node couldn't easily do that kind of load distributing on chip
 
I would dearly love it to be safe to go to gigs again but it just isn't
 
JRL
so overall we got more performance out of PHP
 
at the current rate it still won't be next year either, not in the UK at least ffs
 
JRL
7:56 PM
the application was designed so that each server had one core dedicated to network. it then used sockets to connect to other application instances on the other cores that would actually process the request/event, and would thus get to decide which core to distribute the task to.
thus, on-chip load distribution
it.... mostly worked as envisioned
 
tl;dr the OS is a lot better at scheduling than you :-P
 
JRL
ha, very true
we were able to get better performance than allowing the OS to schedule because the app could predict (since it was aware of the app structure) which kinds of events would require more resources
so it didn't distribute based on number of tasks, but on predicted execution time
but it was only marginally better
definitely not worth the cost of developing it
it might have been if the application was handling like 50 million users
 
@DaveRandom no worries. I only got tickets on the assumptions it will be safe by then, as currently the numbers are dropping nicely according to coronavirus.data.gov.uk
 
@Danack Yeah, I'm going to get tickets for London
 
@Danack I mean if you got a ticket going to waste and can cope with me wearing a mask all night then hit me up :-P
 
8:01 PM
@JRL Yeah, rare is it that the developer time is less costly than the extra servers.
 
JRL
total cost to develop was around.... $210k
around there
 
How do you even have a hard number around development and maintenance of a specific thing? :O
 
JRL
Because I ran the entire department and hired every dev that worked for me myself, so I know all of their salaries and what they were working on at what times.
 
That's just scary :D
Having a general idea of costs makes sense, but knowing it as close as one single month's salary of a single dev is... something :)
 
That's overall application cost, right? Not just the PHP websocket server I hope.
 
JRL
8:08 PM
@Trowski yeah
 
Well that's much easier....
 
JRL
websocket application was maybe.... $25k
distribution/scheduling aspect was perhaps $80k
 
@DaveRandom's mother is like $10 at best
 
-$80 at worst
(she has some really bad days sometimes)
 
Yeah I saw the yelp reviews
 
8:14 PM
the 90s would have called because they wanted their reference back, but they couldn't find the number on your shitty search engine
 
JRL
well that's your fault. if it's the 90s, use the yellow pages
 
There are no 90s. Your mother ate it all
 
idk your mother has been scoring pretty well on trip advisor in her 90s
(I feel like I should make it clear to random readers that this is fine and we like each other btw, this convo is not as nasty as it looks :-P)
 
Welll.. yeah...
I'm rubber, you are glue!
:D
That was an actual LOL
 
I was quite pleased with it ngl
 
8:19 PM
I had to ask Ekin what ngl meant
:P
 
Netherlands Generates Losers
 
fwiw I know ngl because I had to google when @fabor used it :P
 
obv
@Ekin googles fwiw
 
googles obv
 
googles google
 
8:21 PM
On-Balance Volume, gotcha
 
@DaveRandom Tall* losers (but not me)
/me googles google
 
@Ekin oh no it's the other definition - Obscenely Big Vaginas
sorry for ambiguity
 
Google goggles
 
oogles Google
has a nice pair of Os tbf
 
@DaveRandom apology accepted :P
 
8:24 PM
I can't believe I have still never got IRL hammered with you two, needs to happen
 
I am agree, definitely needs to happen
 
In regards to Amp's socket connector: A DNS query returns a number of hosts and config has a number of connection tries before failing. Do I try each host that given number of times or do I only try that many times, even if I do not exhaust the list?
 
You should always exhaust the list
 
It's a list for a reason
@DaveRandom Hell yas
 
8:30 PM
it has order as well
if the server didn't want you to try it shouldn't have told you about them
 
I wonder then if retry should be part of the connector at all then.
 
a valid strategy would be to try all of them at once
feels like it should be configurable
 
@Trowski By default it shouldn't imo
 
@PeeHaa That's what I was thinking, but I wanted to get opinions as I'm reviewing APIs leading up to v3. The current behavior seems wrong IMO.
Round-robin seems to be the typical default connect behavior, not simultaneous.
 
Don't they have a priority?
 
8:37 PM
Order returned by DNS I think.
IPv4 > IPv6
Had that backwards :)
I guess that's only because of this.
 
9:05 PM
hmmm … Is there any particular reason why we don't allow static someclass::somemethod(...) access of non-static methods? I.e. make someclass::somemethod(...)->call(new someclass) work
 
Yes, the work hasn't been done for it ^_^
 
@JRL Ooo, spiffy! Then we can bikeshed it properly. :-)
 
@bwoebi I would like to have Closure::fromCallable(classname::instance_method) generate a closure which can be bound, and if it isn't bound then it errors.
If C::fC can do this, then so can ...
 
@PeeHaa @Trowski from a spec PoV, no
 
@LeviMorrison sounds good :-D
 
9:17 PM
the typical assumption on the part of the server is that clients will try answer records in order
 
But honestly, I want to try implementing value witness tables to allow for generic and specialized Vector like people are suggesting on list ^_^ So I don't think I'll be working on Closure::fromCallable anytime soon.
 
:looking eyes emoji:
 
thus if you throw queries at big DNS services like 8.8.8.8 or 1.1.1.1 they will tend to randomise the order of the response records
 
9:31 PM
@LeviMorrison looks like a time waste to me, I think we should rather push towards a $intArray = <int>[1, 2, 3]; if we want something in that regard … and regarding memory usage, we're about to get github.com/php/php-src/pull/7491
 
@OndřejMirtes yes
 
@bwoebi Maybe. I want to play around with generics in library types though, so may as well start at one of the simplest types that's still useful ^_^
 
9:49 PM
> AddressSanitizer:DEADLYSIGNAL
=================================================================
==1337662==ERROR: AddressSanitizer: SEGV on unknown address 0x603000001d80 (pc 0x603000001d80 bp 0x7ffd8d05edc0 sp 0x7ffd8d05eda8 T0)
==1337662==The signal is caused by a READ memory access.
==1337662==Hint: PC is at a non-executable region. Maybe a wild jump?
#0 0x603000001d80 (<unknown module>)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknown module>)
Well
 
cmb
Good documentation can compensate a lot, but some things might better be never documented.
 
10:32 PM
@cmb pssssssssscht :-P
 
 
1 hour later…
11:56 PM
'0' is falsy ・ *General Issues ・ #81455
 

« first day (3989 days earlier)      last day (945 days later) »