« first day (3330 days earlier)      last day (1843 days later) » 

user11601411
00:04
how would u like run php on your pc?
user11601411
using windows btw
@JoeWatkins In PHP 5, I think the best way to support what I'm trying to do without using zend_execute/zend_execute_ex is to use an opcode handler that does all the same things as the original, except instead of returning the result of zend_do_fcall_common_helper_SPEC, I then inspect the return code, and do things before returning to the VM. The only major problem I see with this is return values; we need access to them even if they are unused.
Where is the correct place to set the opline result type? When the op_array gets compiled?
The idea is to back up whether it gets used, then set it to always be used, then in the opcode handler if the backups says it is unused then it should dtor it.
00:58
@EnderCrayonBM download PHP off the site, install it, and install a web server to host it like nginx or Apache. Not recommended to install on the bare metal, but to each their own.
@LeviMorrison why do you have to support PHP 5 :(
I know you said it was job related, but still
php 5 isnt that bad, specially 5.4+
I'm still haunted by my past job and using PHP 5.4
is there a major difference from 5.4 - 7? asside from perf boost, strict ...
Primarily the code base that I swear was written on PHP 4 then bits and pieces were refactored to use newer versions, but it was unfinished
@samayo security
The code base I used to work on used mysql_* functions
what is added again? mysql_ was depricated but pdo was still in 5.4 if i recall it
01:04
No, mysql_* still existed in 5.4. maybe I was using 5.3? I don't remember.
I think you're right, it was deprecated in 5.4, I'm just going off memory though
Nah, I mean mysql_ was there with deprecation warning but PDO was still there.
But I am not sure, I don't follow php stuff well
I've only started following stuff again in the past couple of weeks, or at least trying to
what are you doing now? learning new stuff?
I took about five months off on a brain-vacation where I did pretty much nothing productive.
I did dabble a bit with C#, but didn't produce anything
for resume/job or you like it?
I usually learn new languages so I can stay updated and maximize my chances in the job market
01:09
I was living off some savings, so I was able to basically not care about expenses for that time, and it was pleasant. It gave me the time I needed to find closure within myself.
that's great ... almost same here, i quit my job last week
new interviews on the line now
@samayo I was planning to build a mobile app with a friend, but his life got too busy to where he could continue working on it. I still plan to do it, but I kinda wanna do some PHP stuff first, heh
If you wanna do that in flutter, hit me up... you can take/own the code or product
I really need to learn flutter
I made a hello world app but that's it
Dave convinced me to build it in C# and Xamarin
what!!?? no please, those are dead frameworks and will continue to die
unless he told you that 5 years ago
flutter/dart, react native or nativescript are tools you need, both for career and they will be there for a long time to come
01:13
It was like two or three months ago
I'm sure he know a lot more than me, but flutter/dart is new and growing rapidly. If you learn it today, you are guaranteed a job for the next 10 years. All startups here are looking for react native devs because flutter is relatively new
but no mention of xamarin, cordova, ionic ...
but do your research
i could also be wrong
When I became unemployed in February, I was pretty depressed and my confidence in myself was low. I kept getting rejection after rejection and the rejection from ThoughtWorks killed my motivation to continue looking. But around the time I was able to dip into some savings and lived off that. In that time, I met a dude who's like the male version of me, and through him I was able to regain my confidence and even build upon it
good to hear
Which is kinda where I'm at now, I just need to get back into the flow of things
where do you live again?
01:17
US
My relationship with him is purely platonic though. He's married and I've a boyfriend. He's essentially the brother I never had growing up.
I don't know about US, but here if you lose your job there is a good social service, so I can't worry about money, other than the fact I need to work
but don't worry, it happens to everyone
Yeah, we have unemployment too, but I fucked it up and was denied it
A lesson learned, to say the least.
hmm that sucks, here even if you fuckup you get around $3K a month
I fucked up the unemployment application to receive funds. To my knowledge, there are no other social service nets to help me. We're the country of "pull yourself up by your bootstraps."
No room for the mentally ill. At least, that's been my perception of it. I could be wrong.
eh, so much for the american dream
marry someone from EU and move out :)
01:25
Tempting
what was that :) ?
I was searching for this
don't learn someone that is the the dying curve
Ah, it was a bit too personal and I didn't want to leave it up
K NP
btw, if you wanna do something with flutter let me know
gtg now, some netflix and sleep
Basically just my plans for the future
Yeah, I'm about to go to sleep as well
\o
 
2 hours later…
03:28
@LeviMorrison you might not be able to change the op type, or at least there's a bit more involved than that ... if something is IS_UNUSED then there is no cache space or stack space allocated for it
 
2 hours later…
05:00
@Tiffany I meant to extract a piece of array by providing start and end index. e.g
$arr = [0 => 'a', 1 => 'b', 3 => 'c', 4 => 'd',  5 => 'h', 7 => 'n'];
array_extract($arr, 3, 5) // extract only elements between those two keys  [3 => 'c', 4 => 'd', 5 => 'h']
05:48
@JoeWatkins Bother. Any ideas about achieving this without re-implementing the engine?
Wes
Wes
morn
you can't modify the code at runtime, it might be in opcache ...
allocating space on the stack is as simple as op1.num = last_var++ op1_type = IS_VAR or whatever, but you can't do that during runtime because you can't modify the code ... what you can modify is the runtime, and you can copy the code from opcache ... so there's still a pathway too it, but the pathway is filled with dogshit, don't walk down it ...
yo wes
hacking the engine is lots of fun ... but most things, it doesn't really want you to do ... to be able to do this kind of thing needs proper support at the zend layer, if there's not an api function that does something, or an un-exported function doing something similar, the chances are you don't want to waste time trying ...
as you read the compiler and vm more, you'll get a better idea of what is worth pursuing and what isn't, because you'll have seen it done somewhere else, or not ...
what you don't want to do is look at other extensions doing stuff and assume that because they are doing it, you can do it ... a lot of instrumentation type plugins take their original inspiration from monsters like runkit (and later uopz) ... don't do that ... take it from /zend alone ...
oh and less so opcache, but mostly treat opcache as the black box that it is, it installs no headers or api, you can't even get at it's module globals ... and copying code out of opcache should be avoided for obvious reasons if you are targeting production ... you have to just consider code marked immutable as immutable for the life of the process and there's nothing you can really do about that except change it before it becomes immutable ...
R.P
R.P
06:57
"If anyone wants to immigrate, better come to Switzerland. The amount of IT companies here looking for Software developers is crazy and the pay is insanely good."

Yet You can´t do much with English
Jes
Jes
Hi all
07:43
@LeviMorrison I would like to say yes, but I'm sure my memory is clouded by the superior PHP 7 structures :-D
Wes
Wes
07:57
@R.P meaning you are required to know french/italian instead?
morns
foison abundance; plenty.
Wes
Wes
\o
08:20
\o
08:39
o/
08:54
return new Process([
'vendor/bin/tool',
'process' $tempPhpFile,
'--dry-run',
'--output-format', 'json',
'--set', $ToolRun->getSetName(),
], $this->projectDir);
09:12
@cmb Half of Thursday is already over here. Waiting for the announcement.
09:35
i was wondering using sockets how much real time application can php handle, i rather stick to my first love than use another language
i am trying to handle real time GPS data and am tempted to use php to write the application
Hurrar \o/
Wes
Wes
you plebs, you should be using php8 like me :B :B
I need to move my containers onto 7.4.0, they're all on rc6
I can get away with a fair bit at work, but running production on 8.0 wouldn't be one of them :P
Wes
Wes
09:52
:P
you ran RC6 in production?
🎉 I've just put PHP 7.4.0 online → it's released! php.net/archive/2019.php#2019-11-28-1
16
Wes
Wes
\o/
Sure. We validated against 7.4
I wonder how long until Composer gets autoload support
preload support you mean? they already stated its not in their scope, because loading all files is problematic vs only loading the ones that are needed or in the hotpath
09:56
@cmb \o/
I'd expect them to eventually extend the composer json to allow setting preloading suggestions etc
Lest we end up with yet another file format in the root of every package
IMHO, it wouldn't hurt if composer generated 2 files for preloading. One to include everything and another to include only vendor/ stuff. Then also allow the configuration in composer.json for a custom one
That one caught me out too. Multiple versions of the vc14 runtime.
Considering that is coming from winutil, maybe we could link straight to the download page?
@Wes nah, PHP6 is the way to go, don't you know?
cmb
cmb
10:12
It seems to me that Imagemagick is shipping own runtimes.
typed properties and arrow functions, yessssss
Typed properties = Winning. At least now Nikic stopped them being entirely useless with __get
I used phpstorm inspections to auto apply most of them based on existing docblock comments and it already turned up several bugs
 
2 hours later…
12:00
💩
oops
or should that be: poops
Wes
Wes
what's this smell
I'll let myself out
Wes
Wes
:P
> Pancakes by themselves are already delicious. But chocolate pancakes are super delicious.
does "by themselves are already" sound funny?
or: Pancakes alone are already delicious. But chocolate pancakes are even better.
R.P
R.P
12:18
@wes #mybad - apperantly You can manage fine with English.
Wes
Wes
lol? not really :B
R.P
R.P
dno, asked friends who are working there. All of them say that Swiss have no problems with English. One friend had problems with German, but apparently it was because German she knew and German they speak there are so different.
12:42
gratz r11.
@Wes it sounds fine.
@R.P that was @samayo not @Wes who said that, lol
the message you quoted earlier
13:04
Yeah, here if you work in IT everyone speaks English and they actually prefer
Most of my colleagues don't even speak French
14:00
LIBXML_PARSEHUGE output formatting – #78877
I'm trying to delete the last character if its a string, can someone help me? Here's what I have so far
if (substr($description, -1) == ' ') {
    substr($description, 0, -1);
}
Wes
Wes
a white space ?
Just do $description[-1] = ''
That notation makes my brain hurt
use trim()?
cmb
cmb
14:14
@MarkR, PHP doesn't like it as well: 3v4l.org/nFQdl
Hum I thought that worked
Welp the more you know
cmb
cmb
oh, indeed it worked before PHP 7.1 (3v4l.org/d4RSn)
That seems to be the wrong link @cmb
But didn't saw it was for white space, in that case rtrim would be better
cmb
cmb
14:22
ack
Now I wonder what the discussion was to change it to a warning
Wes
Wes
4 solid hours of jackhammering near my place this morning
and now they resumed
not only produces the warning as it no longer has an effect
strange that it was chosen to do that instead of just removing the character (instead of replacing it with \0)
consistency™
14:31
I'll maybe have a look at that then this WE if I got time
Because its maybe weird but it can be useful IMHO
The regression test also looks a bit weird
And there is no mention of this in the migration guide either :( I suppose because it was considered as a bugfix
Morgens
14:47
Is there a way to set stdClass elements inside an array at the point of creating the array?
eg I can do this
$userData = new stdClass();
$userData->name = 'bob';
$userData->age = 25;
$user['personal'] = $userData;
But I'd like to do this
$user['personal'] = [// Create the stdClass inside here];
cmb
cmb
Well, overwriting a char is cheap, while removing one is not.
@cmb I get that but is it really a reason to forbid it?
Wes
Wes
@James yes, don't use stdclass, used named classes/structs with a constructor
cmb
cmb
I think, if it's allowed, someone will also be able to do $s[3] = 'insert me here'
Wes
Wes
if you don't like the answer, you can use
$stdclass = (object)[
   "name" => "bob",
   "age" => 25,
];
cmb
cmb
14:51
IIRC, that formerly only used the 1st char (pretty surprising)
Wes
Wes
but that's crap code.
@Wes in this scenario that would mean many object classes. I already have one, I need to take that object structure and (only for view) push it into another structure
stackoverflow.com/a/26151993/10286151 These guys said that it's not secure. But only if i use file_get_contents to get data from a site that is not owned by me?
Is it secure if i do it to get data from my own site?
Wes
Wes
even for a simple DTO i would use a struct-like class
cmb
cmb
Question is, whether it is your own site.
14:54
@boss wat
@boss watwat
@Wes yeah I started that tbh, then ended up here as I was creating 6 classes for the sections. But I don't disagree, proper classes/objects is probably what I should be doing
Wes
Wes
i have written programs with several dozens of classes and i am not even a decent programmer :B
I'll take the plunge..
Wes
Wes
classes are better than managing anonymous objects later
but of course it depends
yeah, I guess in my aiming for KISS I missed the point :P
Wes
Wes
14:56
if the anonymous object is private to some other class then it's fine. if you pass it around then you should start thinking about making it into a named class :P
@James That's what your view is for :-)
well it's in a class in model so not too bad
Wes
Wes
it's easy to lazy out on this stuff. but you always end up regretting it later :D
@PeeHaa but this structure is used in more than one template, and in some other classes
so defining it higher up
also, the API sends back a single array full of data, but they should be sectioned (I know, API should be changed, I don't have that privilege)
thanks for the advice. stops being lazy
Buffer underflow in bc_shift_addsub – #78878
15:16
@boss please read the security notice, and possibly follow the link.
omg 7.4 <3
\o/
Serious bug again: SSL not working – #78879
that's a duplicate
Nov 20 at 22:40, by Jeeves
Serious bug with latest PHP 7.2.24 bug – #78845
It must be serious
cmb
cmb
15:46
Did you actually "run de code below"?
I did not, but it's the exact same code as the dupe?
16:01
@cmb sorry in-between lectures, but the also means that you can only replace a byte, right? You can't currently do $str[5] = あ; then?
cmb
cmb
@PeeHaa, yes, same code like in sevaral other reports (guy's annoying).
Did you just... troll me :P
Or at least bait me :D
cmb
cmb
It was about the "de" :)
damn you and mostly damn myself :D
I hate us both
cmb
cmb
@Girgias, oh, you still can assign strings with multiple bytes to a string offset, but only first byte is taken into account. Thought that was fixed. Apparantly not, likely for BC reasons.
@PeeHaa, you shouldn't hate yourself. :)
16:07
I just didn't expect to get jebaited by you ;-)
16:40
Spelling error report – #78880
@Jeeves Sure let's add fuckton of noise and BC breaks \o/
What is a reason that str_replace would not work?
Trying to replace <br> tags with a space
Example string: mzorzet14🐷<br>Entre ríos,Paraná☄
An obvious reason would be that you are doing it wrong
$description = str_replace("<br>", " ", $description);
Could you tell me what is wrong?
Nothing is wrong
What you have just works
!!> var_dump(str_replace("<br>", " ", "mzorzet14🐷<br>Entre ríos,Paraná☄"));
16:48
[ 7.1.25 - 7.4.0 ] string(36) "mzorzet14🐷 Entre ríos,Paraná☄"
@cmb well that's not what I would expect the code to do :facepalm:
I suppose that's a fun project to work on
cmb
cmb
check master first; maybe that issue has already been addressed
Well I don't have time until the weekend because of commitments but I'll look on master first, I don't think it will fly as a bug report but who knows
17:55
"Can't preload unlinked class" if class extends Exception – #78881
18:15
str_split on a utf8 line complains about 8-bit chars – #78882
any help with a question about laravel middleware please? stackoverflow.com/questions/59094129/… Thanks!
@Tiffany They decided it was worth it from a business perspective. I actually disagree with this move -- it slows down our productivity a lot.
But there's a decent market for PHP 5.5 because of Canonical's paid even-longer-term support, and a lot of people seem stuck on PHP 5.6.
19:05
Just a general question, I'm looking for a local development environment on my MacBook with MacOS Cataline. I used to work with Vagrant and created a config file with puphpet.com. But somehow I can't get it working, the local website (symfony) is working, but it had a lot of issues with writing (file permissions). I'm looking for a vagrant like system that just runs out of the box. I'm not such a server guru, creating a vhost is almost all I can do.
@Timo002 have you tried / are you aware of the php dev server? the command php -S localhost:8080 launches a dev server from the working directory (something like that)
Yes I am aware, but need to run a mysql server.
you can run mysql directly on mac os X
And redis, not sure it that all is possible on macos itself. And also need to run apache
19:25
fgets(STDIN) fails on Windows – #78883
20:07
@Timo002 not sure if Virtual box works for Mac OS, but that's what I use. I set it up from the ground up, with a bit of help.
I think it uses Ubuntu server
Nice thing going that route is you can export the box when you have it set up the way you like it, and before you start tinkering
20:52
mornings
@LeviMorrison I find this hard to believe, the move from 5.6 to 7.0 is normally the easiest.
and what brings canonical support when all the good things are happening upstream.
also I would not trust canonical for support actually.
ThW
ThW
@hakre 5.6 is still the sweet spot of "good enough"
@ThW 5.3.x is.
ThW
ThW
not really
5.6 was the sweet spot for the extended security support. 7.0 is so much faster, you can't say that 5.6 is the sweet spot IMHO. 5.3.x is for backwards compat to cover all systems composer covers.
So maybe from the perspective of not wanting to go over to 7, 5.6 is the sweet spot of being in the 5.3.x line-up w/o applying some regexes for changed order of execution that came with 7.0.
ThW
ThW
but still have a most of the features (namespaces, ...)
21:00
but it does not have iterable, which is extremely useful with going on w/ legacy code.
ThW
ThW
and I mean 5.6 from the viewpoint of library/product maintainers
also not the runtime benefits which really make a difference w/ legacy code.
ThW
ThW
not users
product maintainers in terms of the application owner, running their own product, I can hardly imagine how a sane person can neglect the runtime benefits.
for libraries, this might depend, what level of support.
ThW
ThW
but they don't - users can run the stuff on 7.x, they just don't need to
21:02
yeah, if backwards compat is concerned about I normally take the bottom line composer manifests.
and that then is 5.3.6 or so. haven't looked lately.
but my view might be limited.
ThW
ThW
However that said, I would suggest going to 7.x yesterday
It's so worth. And also keeping current. How many PHP userland libs to be thrown away and than some little code ported.
And the own code normally is very easy to port to PHP 7.
ThW
ThW
Namespaces is a big jump, it affects your file structure, ...
I wish there would be a PHP code downgrader that removes idioms from 7.2/3 code for example so that you can write it in the current version and it results in PHP 5.3 parseable code.
For namespaces I must admit I have not thought about. But namespaces in PHP are somewhat cumbersome.
Perhaps when there are no clashes it's possible to convert them to underscores.
ThW
ThW
I added mapping/alias logic to my CMS autoloader. So that the old plugin can still use the classes with their old names.
21:08
you also did some portings to newer PHP for some of your libs I read here in the chat some days ago.
ThW
ThW
yeah I am upgrading the hardware stuff to 7.3
I can imagine if you write libraries that have some users it can become more tricky to offer an upgrade path over a period of time.
ThW
ThW
thinking about a wiring pi implementation with ffi
@hakre even more difficult if people provide plugins for your products
that would be 7.4 then I guess. But why not. Have not played with it but I always like peek and poke since the CBM64 days and later on importing DLL calls on win32 with Visual Basic.
It's just in the end it's not portable at all but can give a lot of fun for quite some time.
@ThW And then it's getting interesting ^^^
21:17
not yet, let me take a look...
the readme is pretty short, so clone should be fast ...
ThW
ThW
got annoyed by just another XSLT 2.0 functions in PHP question - but now I am a little stuck on unicode collation URIs
what are Unicode collation URIs?
ThW
ThW
@hakre exactly :-)
and this example somehow speaks to me but even switching on speakers does not help reading it out loud gg
@ThW yeah but joke aside, is this Unicode specific or is that Punycode for the URIs?
URIs are normally ASCII. At least last time I looked.
ThW
ThW
http://www.w3.org/2005/xpath-functions/collation/html-ascii-case-insensitive
21:24
And the only Unicode encoding I know of is UTF-8 which is ASCII compat.
ThW
ThW
some are reserved, some are parameters
holy guacamole
ThW
ThW
.. down the rabbit hole
quite a powerful feature
I didn't even know there is some 3.x after xpath 2 (xquery 1?).
and as it says 3.1 I guess there was a 3.0.
are there any FLOSS C libs for that?
I mean a good standard should ship with an implementation.
ThW
ThW
maybe some saxon
dunno
21:31
but that saxon is not public.
and I can't imagine W3C publishes for Saxon only.
ThW
ThW
fun fact PHP has most of that in ext/intl - just not with URIs
Oh, that might be a sweet spot then.
And it also makes sense as Intl is very towards Unicode.
ThW
ThW
but you can use ext/intl to use configured language depended string compare and sort
Or writing digits as text and vice versa.
I don't know if there is sort for that.^^
Oh PHP 7.4 is out. Nice.
Btw @ThW I've seen you've filed an RFC co-authored w/ @beberlei.
And it got just like all votes.
ThW
ThW
@hakre kinda I helped a tiny bit with suggestions and tests, almost all of the work was done by @beberlei
21:41
yeah nice to see the activity.
ThW
ThW
yeah
I wish I could contribute that much. I'm more fiddling w/ PHP userspace all the time.
ThW
ThW
I hope ffi will help bringing core contributors and php userland more together
I think ffi is a double sided sword or how that is said. most of all it allows more binary bindings, which traditionally are more in the scope of php-exts which I think is a good concept on the language level. But it could also lower the entry level, so in the end I guess it's necessary to have these days. But there is always reason for userland and internals. I guess it's better than writing PHP extensions in Golang or what not^^^.
I'm currently fiddling with tar-files btw.
 
1 hour later…
23:00
hellows

« first day (3330 days earlier)      last day (1843 days later) »