« first day (3638 days earlier)      last day (1293 days later) » 
00:00 - 18:0018:00 - 00:00

6:06 PM
Things I never thought I'd do: use PowerPoint as an image editor to make a transparent background on an image...
 
Wes
will you get a t-shirt on hacktoberfest? if yes, how can you live with yourself?
 
It's a PHP t-shirt. It offsets
 
Wes
a php t-shirt?
 
incorrect floating ・ Math related ・ #80170
 
No developers were harmed in the making of the t-shirt. No statement is made as to their state after having written the language...
 
6:23 PM
How long does it take to sync php.net with github.com/php/web-php?
 
user1804599
6:36 PM
@AdelmoMezzi They want people to wear a T-shirt with their logo on it.
 
6:46 PM
@Tiffany I've done this quite often when I am not on my home PC and don't have Photoshop on the one I am using.
 
7:04 PM
I'm refactoring some legacy code to use namespaces, but I need to add a class_alias to the bottom of each class so I don't break BC. Do I have this correct? class_alias(__NAMESPACE__ . '//ClassName', '\\VendorName_ClassName');
... I hate this keyboard
I'm just confused on the usage of // and \\, not sure if I'm using them correctly
 
@Tiffany eek
@Tiffany class_alias(ClassName::class, \VendorName_ClassName::class);
 
@Tiffany Wont' autoload say no?
 
She said it's legacy; brave of you to assume it's using an autoloader :)
 
it has an autoloader, but it's in-house :P
 
But of course it is.
 
7:14 PM
as far as I know, from what I was shown yesterday, it shouldn't break the autoloader
@NikiC thanks, going to see if my supervisor will let me do this...
 
@NikiC How do I get the LSB scope for SplFixedArray::__set_state? Consider:
final class Vec extends SplFixedArray {
    public $type;
}
$vec = Vec::__set_state(...);
 
 
1 hour later…
When I see SeaRyan, I immediately think this is a link to Ryan Seacrest's Twitter.
 
Hacktoberfest doesn't include pull requests that are currently open but pending changes, I'm wondering if it would be cheating to close it an open a new one :p
 
A hack? I would say... acceptable.
 
Heh
I see whatchu did there
 
=)
And also, @Alesana sus.
 
8:43 PM
I'm not even playing and I'm sus lol
 
8:59 PM
Morngins
 
\o
 
class Base
{
    public static function name()
    {
        var_dump(get_called_class());
    }
}

class Child
    extends Base
{}

Child::name();
 
@PeeHaa o/
Time to head home- later all.
 
This works as expected, but LSB doesn't seem to work if Base::name is an internal function that uses zend_get_called_scope.
 
@PeeHaa I think we're going to try and play later tonight, if you're game?
@LeviMorrison You deserve a break too... you should download Among Us and join us. =)
 
9:05 PM
@StatikStasis Not entirely sure yet. Just about to call it here and woke up way too early at like 10
Ping me though
 
will do.
 
Actually, maybe it's a bug in my serialization, not my unserialization. :/
 
<3
 
Ah yep, the serialization is to blame. Curses!
 
9:12 PM
So, looks like Sara has given us a few more weeks to bikeshed naming things. :-) :-( at the same time.
 
is it just a coincidence that he is blocked in PHP-Parser? 🤔
 
@MateKocsis It's not ;)
 
Wes
is there any intention to introduce intersection types?
i have a few use cases. for example with the interfaces A B C, i have to create stuff like AB extends A, B{}, AC extends A, C, ABC extends AB, BC, AC which add no methods. they are created only so that they can be used in type declarations
 
9:33 PM
I hope so, but it's not high priority for me. Commonly things like Countable & Iterator or Countable & IteratorAggregate would be useful to me
 
@Wes I was trying something about it last weekend, got stuck in the Parser, then found this: github.com/php/php-src/pull/1887
 
Wes
i have one instance of this in particular that would really benefit from intersection types, they are a series of interfaces (like A B C D) that make sense on their own but they can also exist with a marker interface added (eg X), so i have to create a bunch of of empty interfaces, like AX BX CX DX just so i can use them in type declarations
naturally it would make much more sense to have function bar(A & X $object){}
but i realize it's a very specific use case
 
What do I do in this case: replace the tarbals or fix the references: github.com/php/web-qa/commit/…?
 
Wes
@LeviMorrison the counter argument to & was "no you shouldn't extend interfaces, you should use composition over inheritance", but for example Countable & IteratorAggregate is about two separate objects, where the one is the external iterator. so you can have legitimate cases of extending interfaces while still doing composition
i'm probably very far from being clear :P
 
Wes
9:45 PM
i have a bunch of cases where i could use intersection types, but no one justifies the effort probably
would be just nice to have. not nearly as important as union types
 
Gonna try to come up with an implementation, one day hahaha
It's been a good opportunity for me to learn more about the php-src
 
How do I fix this warning? $totals[$count]++? I get "Undefined array key 1"
 
Aside from this Hacktoberfest kick on SPL issues, I'm hoping to try adding array literal construction for types e.g. SplFixedArray[1, 2, 3]. Need to figure out how to make it co-exist with array constant literals.
 
10:11 PM
Is there a reason we don't have the --leak-check=full flag on the valgrind command in runt-tests.php? Adding the flag seems to expose memory leaks that are otherwise not detected.
USE_ZEND_ALLOC=0 valgrind -q --tool=memcheck --leak-check=full --trace-children=yes --vex-iropt-register-updates=allregs-at-mem-access $(which php) -n -d "max_execution_time=1" -r "while(1) {}"
 
cmb
@SammyK performance? Anyway, run that also with USE_TRACKED_ALLOC=1.
 
@cmb Interesting. USE_TRACKED_ALLOC=1 seems to make the leak go away... But there definitely seems to be a leak when zend_error_impl does a zend_bailout and message is never freed from here: heap.space/xref/php-src/Zend/zend.c?r=da0663a3#1419
 
cmb
I think those leaks don't really matter, because ZendMM will free that stuff on request shutdown anyway.
 
I guess the moral of the story is that ZMM will always leak on zend_bailout(). :sad_trombone: I can't wait for the day where we can remove zend_bailout()... you know in 2057. :)
 
 
2 hours later…
Wes
11:52 PM
it's not a bug it's a f....... youtube.com/watch?v=ZZs2HUW9tDA
 
00:00 - 18:0018:00 - 00:00

« first day (3638 days earlier)      last day (1293 days later) »