« first day (4438 days earlier)      last day (496 days later) » 

12:09 AM
@hakre Situation is different when exported part is in the middle of bigger file -then nothing on that would run. And if documentation says that the returned code will be valid it should be valid. If you want to fail early - deprecate exporting functions, generators etc. and throw an exception in 9.0. Valid code you can filter with AST for example and remove not wanted classes. Also in the middle of the anonymous class name there is a null character.
 
12:26 AM
Just for fun I've made a poc for importing any anonymous class 3v4l.org/2HgDQ - where it might not be the best idea, it's possible. Initially I was leaning to return NULL, but I'm starting to see some pros of only fixing the name.
 
12:42 AM
@Krzysiek honestly, don't trust the map but the terrain. meaning: the docs is not leading, the implementation is. if docs are wrong, they need updates first of all.
 
@hakre I can agree that docs are wrong, and probably this case should be mentioned, but I'd also fix the code for the next minor or patch :)
 
@Krzysiek for the fun I tried to use the export of it, but eval'ing the code still remains a problem. IIRC the way is to create an intermediate variable with the name 0 containing a non-empty value so that the negated value (false) cast to a boolean then used as a string expression of a variable name ("0") turns into that class-name w/o causing the parse error.
@Krzysiek honestly I don't think there is anything to fix. maybe a reminder that the premise the return value is valid PHP code is implementation defined.
and then document until which PHP version this was true 100% - and then this would violate the policy to keep a change log for versions before PHP 7 for the current docs.
So then again the docs are already fine as long as you find in the top left corner PHP version 4 first for that function.
which I'm pretty sure is the case. /e: yes: "(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)"
 
@hakre without violating policy: "99% valid code" would remain with mention of this exception :)
 
Yes, and it's perhaps worth the note. As well for undefined classes (autoload, PHP 5) and anonymous functions (PHP 5.3).
And curious: How did you stumble over it?
 
1:01 AM
By accident, when playing with code from other issue var_export vs enums.
 
1:14 AM
@Krzysiek perhaps then docs should state that return value is valid php code if $value is exportable, invalid PHP code otherwise.
 
 
3 hours later…
4:16 AM
> [EA] New value type (\Psr\Http\Message\MessageInterface) is not matching the resolved parameter type and might introduce types-related false-positives.
adding a header to a Slim Response... parameter type is \Slim\Http\Response... but withHeader can create a MessageInterface...
I don't know how to go about making EA inspections happy on this, or if I should ignore it
but also the potential for a false-positive is concerning
$response = $response->withHeader('Content-Type', 'text/csv')->withHeader('Content-Disposition', 'inline'); is what I have
 
4:43 AM
Is your function using Slim\Http\Response or the ResponseInterface?
 
4:59 AM
The former
 
Given that withHeader is annotated static it feels like a false positive. But I also thought Slim required use of ServerRequestInterface / ResponseInterface and that the Slim\Http\Response was just a concrete implementation.
 
 
9 hours later…
1:38 PM
dont u think php will dead in next 5 years ?
 
1:51 PM
If we all try hard enough, sure.
 
Are there any plans to ever deprecate the array() notation?
 
@OlleHärstedt why would there be?
 
@Danack Pja, only reason would that we have [] and there's no reason to have two ways to do one thing. No other reason tho.
Not saying we should or anything, just curious if any discussion existed.
 
There needs to be a reason to break a whole load of working code.
 
1:55 PM
And to be clear, for the lulz could be one....
but it might not pass the vote.
 
 
6 hours later…
7:44 PM
@Danack In my experience lots of amphp/* things tend to also be low maintenance :D
 
7:55 PM
@PeeHaa what's the rush......
 
Horry shit. I like that
That was cool
@Danack Do you have any fixes / changes planned for auryn?
 
@PeeHaa well make it installable on 8.
There's some ...stuff, that might arise later if/when we have function autoloading, particularly for the more magic bit of that. But I'll probably do a separate version of the library for that. Hence listing the alternate versions.
 
Afternoon All
 
Some more tunes from the ancient past: youtube.com/watch?v=LRqvXotb9b4
 
It's already installable on 8 though? We are running it on 8.1
Or do you mean the "type confusions" it has on certain 8 improved types?
@StatikStasis ohai o/
I should probably ask for some time too to work on auryn at some point as we are using it heavily in production
 
8:09 PM
@PeeHaa yeah, and making tests run.
 
If you need / want help I can probably be available in the new year to do some work on the boss' time, which is much more reliable than my free time (looks in disgust at all the neglected OSS projects :D )
 
8:33 PM
@PeeHaa Hey man!
@PeeHaa are you working for someone else now or still yourselves?
 
Full-time contractor for a company
So pretty much working for someone else for all intents and purposes
You ready to give me a slice of that non-profit pie yet? :D
 
 
2 hours later…
10:42 PM
Is it true that echo, printf, and text outside <?php ?> tags all write to the same buffer?
How does PHP really deal with that text?
 
which text?
 
@MarkR Any text that's not inside php tags. HTML, for example.
Hm opcode looks like an echo
 
As far as PHP is concerned it's just writing a string - 3v4l.org/2KkAe/vld click on VLD
 
Yeah just checked
What bothers me is that php seem to create a new output buffer everytime it steps into php tags
 
What gives you that idea? I'm not sure either way, but it feels strange
 
10:56 PM
Nah, I think I'm wrong. Jumping around.
Can I make echo and printf write to different buffers....?
 
you could use ob_start before them?
What is it you're trying to achieve
 
Maybe yeah
Eh, basically code-golfing
 
you could just do sprintf instead and append to a string
 
Maybe
No, won't work, printf must be able to flush immediately
Guess I could write to stderr instead
 
it will flush if there's no buffer
 
11:03 PM
Yeah, but then it also outputs the text outside the php tags ><
Basically I want to get rid of the implicit echo for all text outside php tags
 
Then you're stuck with the buffer afaik
 
There's only stdout and stderr?
 
Those are streams, you can make as many of those as you want, but the default buffer writes to stdout
 
unless you redirect it, but i doubt thats a solution
 
@MarkR Right, thanks
 
11:14 PM
This is a purely academic exercise yes?
are you open to insane solutions
 
Insane is good, the project is an elaborate joke :D
 
Is there only one block of <?php or multiple?
 
Well if I go with this solution, there will be ?> <?php at each variable
variable declaration, not usage
OK so fwrite() does not buffer
Showcase here: 3v4l.org/WEOtB
 
11:56 PM
Or better, use STDOUT constant instead of fopen
 

« first day (4438 days earlier)      last day (496 days later) »