« first day (3318 days earlier)      last day (1624 days later) » 

12:00 AM
strbrk should accept a $length parameter – #78821
 
 
1 hour later…
1:13 AM
Defcon just dropped all its recordings online if anyone is into it
all on youtube
 
1:35 AM
Returning from multiple function calls – #78822
 
2:29 AM
Well so or PHP 7.4 leaks memory with typed properties, or PHPUnit leaks memory with typed properties
 
2:47 AM
what do you mean by leak ?
 
Well good question, it's just that Ocramius's no-leaks library which hooks up into PHPUnit shows a bunch of errors
 
that doesn't look like a useful tool
 
And the question is: Is it on PHPUnit's side or on PHP's engine side
Welllll
Just trying stuff out
 
php has quite sophisticated leak checking built into it's core and is tested in a bunch of configurations on different platforms, the chances of finding a genuine leak in the engine using memory_get_usage are probably close to nil ...
you might find a bug in memory_get_usage, or highlight that the memory allocated for or during a call has a longer lifecycle than the call itself, which is totally normal in programming, totally and completely normal ...
 
Well also, I'm pretty sure Nikita put ASAN, USAN, MSAN checks on PHP 7.4
Therefore I'm more inclined to think it's on PHPUnit's side
 
2:53 AM
yeah, it's tested in just about every configuration we can think of and some we don't really care about now ...
 
But don't have the energy to dive into it more currently
Which is pretty sweat and cool that you guys managed to set up all this tooling during the summer
 
well what do you mean on phpunits side ? I tend to think you are using a silly tool ... if I write a tool called php-sillyness that throws an exception whenever a file is more than 42 lines long, the fact that an exception has been raised doesn't mean all files should be less than 42 lines, it means I shouldn't write or have written php-sillyness
brb, off to write php-sillyness
3
 
Well, maybe it is a silly tool, maybe it does point out some outrageous code, but I'm just seeing if it can be usefull
And if it bugs out on stupid then it's currently non in an useful state at all
 
imo, the answer is a very loud no ...
 
I mean I'm using it on a CSS Parser written in PHP which already found a bug in Psalm sooooooo
 
2:57 AM
show me this bug it found
 
Do you have a GitLab username? It's currently private because I'm not totally finished
 
Well it can wait :)
 
this is outside of the scope of userland php, that's a matter of fact, anything it finds has to be by coincidence because it's not technically fit for purpose
(it cannot do what it says it can do)
moreover it couldn't, not just that it doesn't ...
 
user11601411
4:00 AM
hello can someone help me with my rename function not working this is my rename function rename('log.html', './Logs/log.html');
 
4:42 AM
\o
 
4:56 AM
o/
 
5:49 AM
Was feeling a bit chipper and thought I'd try using {} for delimiting generics. Got this to parse:
class {Element} Collection {
        abstract function push(Element $e);
        abstract function pop(): ?Element;
}
I'm pretty sure it can go after the name, but my brain isn't working well at 11pm haha
The only restriction I can think of if I get past this shift/reduce (which I'm pretty sure is solvable) is that you couldn't have an anonymous class that is generic, which seems totally fine because you can only use it in one context, the one you are new'ing it in. (Actually, I think it would work in this context too, night-brain not working well obviously)
 
 
2 hours later…
8:00 AM
spruik to make or give a speech, especially extensively or elaborately; spiel; orate.
 
 
1 hour later…
cmb
9:27 AM
@girgias, don't you hit something like 3v4l.org/aEehQ here. Did you try with RC6?
 
 
2 hours later…
11:49 AM
> Feels chipper.

Tries to tackle the most wanted feature in existence :P
 
@cmb not at all, I'm using it with a combination of roave/dont which "disables" __set() and co. But it only does that on certain instances which is quite weird so
 
 
1 hour later…
12:55 PM
twitter.com/github/status/1195401077249761286 heh, php-src shows up at around 1:44 here
 
1:32 PM
mornings.
 
cmb
\o
 
1:49 PM
o/
 
ThW
2:01 PM
@Trowski The base lib for my hardware experiments
 
2:54 PM
@BobbyAxe yw, glad I could help
 
@kelunik does amp/dns always try a local resolver first?
 
Morning all
@PeeHaa yes, AFAIK first is resolv.conf or other OS local resolver and then remote resolves,
I did the patch for resolv.conf recently
 
@brzuchal I ssume resolve.conf is somethign different than 127.0.0.1:53
It's literally just a file right?
It doesn't have a process handling it
 
Oh yeah, sorry
 
I notice everybody in here github.com/kelunik/acme-client/issues/69 has a local resolver as the first resolver
Which is weird
Or at least some fat coincidence
 
2:59 PM
But if the nameservers are there they're used first
 
kk aye
 
Ok i'll just shut up :)
 
Neh it's good to know
Is it normal to have a 127.0.0.1 resolver in there?
 
Am attending the PHPCon PL now having a lot of fun if you know what I mean, so can be mistaken ;)
 
3:18 PM
So TL;DR you are drinking :P
@brzuchal
 
3:31 PM
@PeeHaa it always uses what you configure in resolve.conf
@PeeHaa that's likely systemd-resolved as local resolver inbetween
 
I didn't realize it actually was doing it over an udp socket :)
 
user11601411
yo any1 wanna help me
 
user11601411
for some reason my rename thing doesnt work
 
user11601411
rename('log.html', './Logs/fat.html');
 
Firstly always use a absolute path instead of relying on php's magic for the currentworking dir
Use __DIR__
 
user11601411
3:36 PM
for the first one?
 
user11601411
or both
 
All paths everywhere
 
user11601411
so i change it to like __DIR__/Logs/fat.html?
 
__DIR__ . '/path/to/your-file'
__DIR__ is the directory of the current file
 
user11601411
so i do like __DIR__.'log.html',__DIR__.'/Logs/fat.html'?
 
3:45 PM
if your current file is in the same directory yes. But you need to do __DIR__ . '/log.html'
 
user11601411
so i have this rename( __DIR__ . '/log.html', __DIR__ . '/Logs/fat.html'); but its just deleting the file but not moving it to Logs. the html file is in the same level as the folder
 
$pin = htmlspecialchars($_GET["pin"]);
$postFields = '{"searchBy":"pincode","value":480553}';

I want this 6 digit number should be picked from URL query parameter, for this I created $pin variable, any idea how can I use this as $postFields = '{"searchBy":"pincode","value":.$pin.}'; I am using dot variable dot as php concat works like this but this is not working.
I am creating INDIA PIN CODE to ADDRESS API and 480553 is static above so I want as URL?pin=110001 so that it can be dynamic based on url query param, example is developersdiscussion.com/test/pin.php?pin=110001 here I am giving pin as 110001 and I want to replace static one 480553 by using $pin variable, any idea?
 
4:28 PM
@ThW Is there something Amp is lacking for hardware?
 
ThW
4:40 PM
@Trowski I am currently refactoring my libs, part of that was removing any event loop except a simple StreamSelect and replacing them with an interface. React got moved into a adapter, Alert just removed and Amp added. Still working on adding tests and refactoring before moving on to the Firmata and GPIO libs.
 
@Jeeves "ORIGIN OF SPRUIK First recorded in 1915–20; origin uncertain" - I hate that this word just arrived from nowhere with such weird spelling.
 
cmb
5:06 PM
spruik sounds Dutch to me
 
I know - but they deny it.
 
Here b/c JS is dead and same pple here anyways
Why wouldnt this work?
 
5:22 PM
@Trowski very nice. do you know of any utils written "in" Amp for CLI?
 
cmb
PHP 7.4.0RC6 announcement: "Please DO NOT use this version in production, it is an early test version." Looks like we'll have more RCs. ;)
 
user11601411
5:42 PM
so i have this rename( DIR . '/log.html', DIR . '/Logs/fat.html'); but its just deleting the file but not moving it to Logs. the html file is in the same level as the folder
 
user11601411
i mean it with under scores like DIR
 
user11601411
__DIR__
 
6:05 PM
@EnderCrayonBM what is the return value of your rename() call that does not work?
 
user11601411
?
 
user11601411
i dont think there is one
 
user11601411
6:51 PM
@hakre i dont think it returns anything
 
8:03 PM
@hakre util is a very broad term, what are you looking for?
 
Wes
\o
 
8:39 PM
@kelunik sorry, I meant command-line utilities
resen
 
@hakre Do you mean tools to write them or written tools?
 
@EnderCrayonBM uh, that function must return something. assign the return value to a variable and check it.
@kelunik written one, even if only some example or poc.
 
@hakre Psalm uses it for its language server. There's fink and my acme-client.
 
@kelunik well, that's a daemon, right?
 
The usage in psalm? I guess so.
 
8:43 PM
but anyway, this sounds like a good example in general. so not that it sounds degorative from me.
fink sounds great for a CLI example.
 
user11601411
@hakre like in the console?
 
user11601411
also i dont set that variable
 
user11601411
its a php thing
 
@EnderCrayonBM in the PHP code. get the return value, set a breakpoint or log it and then find out what is going on there.
 
user11601411
how do i do that :P
 
8:46 PM
without the return value from the rename() function it's hard to say what is going on.
@EnderCrayonBM how do you say right now it does not return?
 
user11601411
?
 
@kelunik thanks for the examples.
 
user11601411
what do u mean by how do you say right now it does not return?
 
@EnderCrayonBM you wrote, that the rename() function would not return anything. And I just asked, how do you know that it does not return.
 
user11601411
i dont see anything in the console
 
user11601411
8:48 PM
is that how it works?
 
no, it's a function in the code and you can only check a functions return value if it's assigned to a variable and you then "look" into that variable.
 
user11601411
so i like
 
user11601411
set a var to that function then echo it or smth?
 
Could be with a debugger or displaying it with var_dump().
 
user11601411
is this correct? `$rename = rename( __DIR__ . '/log.html', __DIR__ . '/Logs/fat.html');
var_dump($rename)`
 
user11601411
8:50 PM
with a if statement before it
 
user11601411
an*
 
var_dump() is normally better than error, because echo will turn a false into an empty string (which then looks as if nothing was output) but var_dump would say it's a false.
@EnderCrayonBM that looks good.
 
user11601411
it doesnt return anything
 
user11601411
it just deletes the file without moving it
 
that is interesting, there must be the output of the var_dump.
regardless whether rename() worked or not.
 
user11601411
8:53 PM
it semi-works cus it did delete the file (which IDK why it is doing)
 
user11601411
so i guess it didnt work?
 
user11601411
do you need any other code or information or testing result?
 
can you isolate the problem to a script with only that line? and then the return value display. you could also log the result, maybe w/ var_export. error_log(var_export($rename, true)). then checklist from top to bottom the error log configuration, verify it works, locate the error log and check the return value as it is now logged.
I first of all would need to know the return value. That is what I already asked for. Nothing else so far.
 
user11601411
9:19 PM
a script with only that line with the files there?
 
user11601411
or can i do a new one
 
10:21 PM
o/
 
user11601411
o/ can u help me
 
okay lets hear it
 
10:35 PM
ZLIB_LIBS not added to EXTRA_LIBS – #78823
 
user11601411
@BobbyAxe its the think i talked about with hakre
 
not sure if i get the full gist, but if your rename and move command is deleting the file this means that its actually moving the file so check the move to path you've given, may be missing it by a folder.

also check the permissions for the folder you want the file to be moved-to, permissions can be an issue sometimes.
 
11:15 PM
SSL verification fails on Debian Buster – #78824
 
user11601411
11:35 PM
@BobbyAxe how would i check the permissions?
 
user11601411
also i heard that rename does the moving too so....
 
@EnderCrayonBM your in a bash terminal right?
$ ls -ld directory
 
user11601411
bash terminal?
 
user11601411
im using some online thing so..
 
user11601411
idk
 
11:39 PM
what environment are you on?
 
user11601411
how do i find out
 
how are you currently viewing you server ?
 
user11601411
though the website
 
user11601411
u mean like the console or smth?
 
okay a UI
@EnderCrayonBM yes
 
user11601411
11:42 PM
yea through the website
 
am guessing inmotion hosting?
 
user11601411
nah repl.it
 
or your actual website?
 
user11601411
im not hosting it for like professional uses
 
user11601411
so...
 
11:43 PM
hold on let me look that up
@EnderCrayonBM echo substr(sprintf('%o', fileperms('/path/to/directory')), -4);
 
user11601411
in which file?
 
any file
 
user11601411
or in console
 
index.php
thats a php function
run in any php file
 
user11601411
what do i change /path/to/directory to, the folder?
 
11:51 PM
yes to the folder your trying to move the files to
 
user11601411
do i need to add __DIR__ before it
 
user11601411
so i have this echo substr(sprintf('%o', fileperms('__DIR__ . /Logs')), -4); and it says stat failed
 
user11601411
the folder and index.php is in the same level
 
i dont really know how your project is structured, so i will leave that decision to you =D
 
user11601411
?
 
11:53 PM
okay then ./folder should work
 
user11601411
dont see anything getting said in the comsole
 
user11601411
wait
 
user11601411
i see this number
 
user11601411
0755
 
0 means no access to the file
7 is full user privilege and 55 means read and execute for group and world
 
user11601411
11:56 PM
so i need to change it using chmod
 
user11601411
to like 7777?
 
no just 777
 
user11601411
i only need to change the folder's?
 
hello
 
not sure if that will solve your issue but its wort a try
 
user11601411
11:58 PM
ok
 
@YODA hello
 
@BobbyAxe I have a doubt. can you help me?
 

« first day (3318 days earlier)      last day (1624 days later) »