« first day (2957 days earlier)      last day (1988 days later) » 

12:04 AM
debug_backtrace() — Callstack arg values are modified inside the callee – #77179
 
IIRC that intentionally changed in PHP 7 or so.
 
12:25 AM
My name's Jason Shaver and I'm an engineer with Azure (not marketing, support, or sales) interested in chatting with a few PHP professionals. I'm wondering if maybe, just maybe, we missed the boat on PHP with Azure. Wait, stop laughing =) If your willing to schedule ~15m chat, please go to aka.ms/php2018 and give me your email. I'm willing to give $25 Amazon gift cards (or charity) for anyone I talk with.
7
hoping that is not too spammy for folks
 
12:40 AM
@JasonRShaver not a problem.
@JasonRShaver you should say what timezone you're in btw, and what times you can talk.
This room is busier during the UK day, and probably not many people on at half past midnight.
 
@Danack thanks for the advice, I'll try this at a sane time tomorrow =)
 
 
2 hours later…
3:04 AM
@JasonRShaver "Clound Storage" btw also.
 
@Danack New cloud service where we use clowns to route your cloud storage? =) btw, you're my hero for helping me out =)
 
3:37 AM
Morning room
 
@Linus Morning. I dropped a watch part on my floor and I think I just have to accept it has gone to a better place... Not as relaxing of a hobby as I thought.
 
 
3 hours later…
6:51 AM
hi all
which php framework is good
 
I would suggest don't use any framework .. rather create your own
btw!! you can use Laravel framework for big project and other CI, cakephp framework for small projects
 
@Tiffany VS Code is based on Atom so it wouldn't make much of a difference. Typically, if an extension is available for the one editor it is available for the other
@Exception What are the benefits of creating your own framework?
 
7:30 AM
@RonaldMunodawafa you do not need to learn framework and you know where to make changes for your project related additional task
 
I think PHP frameworks should ideally be thin
 
@RonaldMunodawafa every PHP frameworks was ideally be thin at the start and then things gets added and it becomes bulky
 
It's like with programming language translation I guess in terms of how there is a cycle of complications and simplicity in terms of the features provided by languages
For every Lisp, there is a C++
And for every C++, there is a Haskell
 
maybe
 
@Exception I like that Symfony loosened the coupling on their components
It allows usage of the framework's components without the need to ask for a whole jungle when you all you want is a leaf
 
7:43 AM
see you have your answer.. ;)
 
8:00 AM
sippet a small piece of bread or the like for dipping in liquid food, as in gravy or milk; a small sop.
 
 
1 hour later…
9:19 AM
mornin
 
9:40 AM
moin
 
10:23 AM
mornin
 
aloha
 
meowing
 
10:39 AM
morns
 
11:30 AM
@RonaldMunodawafa most frameworks are good for one thing: rapid prototype development. Laravel will not produce maintainable code. I'm also a parrot from this chatroom, so I can't give tangible reasons why. chat.stackoverflow.com/…
 
12:15 PM
@RonaldMunodawafa hackernoon.com/…
 
12:47 PM
@Tiffany You keeping it up?
 
1:02 PM
rot8000? is that the more secure version of rot13?
 
the unicode version of it :P
 
Mornge
 
1:19 PM
Hola
 
1:35 PM
@MadaraUchiha keeping what up?
 
@Tiffany hpmor
 
@MadaraUchiha yeah, on around chapter 28
I'm making an effort to understand the science, so it's taking me longer than other chapters
 
1:49 PM
@Tiffany :D
 
Went on a job interview today for "php" but was only asked laravel specific questions :P
 
@mega6382 That's PHP nowadays.
That and WordPress
 
nonoNO.gif
 
@MadaraUchiha Well, yeah, I suppose or at least in the minds of management.
 
@mega6382 Did the Dark Side they at least offer you cookies?
 
1:59 PM
Am I getting confused, or does Redis escape slashes on some commands but not on others? Seems quite a break of https://en.wikipedia.org/wiki/Principle_of_least_astonishment
 
@Machavity Nope, just tea, no cookies :(
 
^^ that has been bugging me for a while. Am I just missing something obvious or is that behaviour really weird.
 
@Danack its spelled "slashes" btw :P
 
/oh
// really?
/// I didn't know that.
//// ....
///// SLASHIES 4 LIFE
 
:D
 
2:03 PM
@Danack So, if you escape the slashes in the second match command it already finds the key as expected?
 
10.254.254.254:6379> scan 0 match Some\\String*
1) "0"
2) 1) "Some\\String\\With\\Slashies"
yep
the same effect happens in code: stackoverflow.com/q/52168470/778719
which doesn't go through the command line string escaping.
 
@Danack I think it's a limitation with scan
 
TL:DR I encountered this by using php class names as prefixes for keys, but then couldn't search for those keys. Replaces the slashes with _ made the code work as expected.
 
it may be a difference between patterns and other strings
 
@Danack I saw PHP code that generates a JS string that gets passed to a regexp constructor
Something like
$str = "new RegExp(\"https?:\\\\\\\\$url\");"
two for PHP escape, two for JS string escape, two for RegExp escape
 
2:06 PM
Funny thing is I can set or get a key with a backslash, but scan won't return them for me
 
(it wasn't https?: those need forward slashes, it was something with a Windows path IIRC)
 
@Machavity exactly. Setting a key, a single slash is saved as two slashes. Using a key in scan, you need to manually convert to double slash.
 
Not sure if there is a better page for it, but here it does mention that `\` is the escape character for patterns
 
o/
Today marks my last day at my current job, onwards and upwards, starting on Monday!
 
@Sean Good Luck
 
2:13 PM
@Sean We'll miss you. Have fun in the Java room
 
@Machavity Bahah, fortunately no Java for me.
 
@Sean Don't talk like that, cause if @Gordon hears it, he will eat you alive :P
 
@mega6382 I think he's still the only one to escape having to use PHP for a living
 
probably :D
 
@mega6382 I guess even @Gordon will understand Java is not fun when you're attempting to monkey-patch internal java classes at run-time, because it's the only way to actually get hold of the source of synthetic bridges (you have to intercept their generation)...
Also: sun.misc.unsafe.Unsafe is a nice class.
 
2:22 PM
@bwoebi IDK, but our guys instrumenting java seem to have lots of fun with that
 
@Gordon if only it were for actual instrumentation purposes. But here I just want to reflect over a functional interface specified by classname::methodname
And it should just work...
 
why are you doing Java? I thought you were a deep C creature?
 
@Gordon I'm a complicated-problems creature :-P
/me continues reading about protobuf plugins ... looks like I'm going to write some c++ next
 
@bwoebi are you using bytebuddy for this?
 
2:38 PM
@MadaraUchiha looks like a case of leaning toothpick syndrome
 
Does anyone know about a well-written book for PHP Zend Certification Exam?
Thanks.
 
Anyone here familiar with Strips SDK? if so, what should I look at if I have a recurring payment solution app, and want to offer that to my customers?
 
@FaysalHasan why would you want to buy that now that Rogue Wave has shelfed ZF development?
 
@Gordon I didn't know that before.
 
no one knows what will happen to ZF. There are ideas to create some sort of foundation but nothing is certain for now.
 
2:54 PM
@Gordon Zend Certification is also what they call PHP Certification. Might not be ZF
 
right
 
@FaysalHasan Which certification are you training for?
 
@Gordon I'm gonna be prepared for "PHP Certification"
 
somewhat pointless, IMHO
 
2:58 PM
@FaysalHasan no book is needed, just get their exam guide and php.net is a great resource
@MadaraUchiha that is definitely pointless
 
@mega6382 Your face is pointless
 
@MadaraUchiha I am rubber and you are glue... :P
 
@mega6382 no u
 
I got the point. Thanks to everyone.
 
3:04 PM
posted on November 20, 2018 by CommitStrip

 
PDO Statement is not reusable after closing cursor on PDO OCI – #77181
 
@MadaraUchiha :P
 
3:26 PM
@pmmaga I guess that makes sense.....functions that are wildcard aware need escaping. Functions that are not wildcard aware, don't.
 
Running opcache_compile_file() on the command line segfaults – #77182
 
don't know if its real but cool nonetheless devrant.com/rants/1884538/…
 
@MadaraUchiha I should report this as "offensive"
 
$_SERVER is not set in preloaded classes – #77183
 
3:53 PM
ietf.org/mail-archive/web/cfrg/current/msg09854.html -- if this passes and XChaCha20 becomes an IETF standard, I'm thinking about sending a PHP 7.4 RFC to add the xchacha20 variants of secretbox, etc.
4
 
when asking a vendor to add comments to their code, should I specify that the comments should explain what the section of code is doing?
or what should I ask them to comment?
 
4:12 PM
@Tiffany possibly more something like why that section of code is doing that.
if what it is doing is not understandable from reading it, changing vendor is a suitable way of proceeding
 
@FélixGagnon-Grenier lol. I didn't pick the vendor, and I can't change it.
 
@LeviMorrison compiler_globals_ctor in zend.c
 
@Tiffany well then, hopefully all will go well :)
 
but from what I've been told, the developer is a good dude
he worked on his part within our development application server, so I can review his code. I'm reading through it and making notes of things I'd like to see or changed. Most of it is understandable enough.
however, he does have an $x variable ...
@MadaraUchiha do you see usage of onclick in code? I thought that shouldn't be used, and a click event should be added in the js
 
4:33 PM
Okay, I am now generating opcodes to verify variance at runtime. Time to see what I broke, and if I fixed anything!
 
@bwoebi Assertion failed: (loop->watchers[w->fd] == w), function uv__io_stop, file src/unix/core.c, line 896. means there's two watchers on the same FD, correct?
Yeah, looking at the source that seems to be the case. But why is that not caught before calling uv_stop?
 
4:55 PM
Well I broke a dozen tests, but it's working!
I need to look through them -- they might just be differences in the warning/errors.
 
progress! :)
 
Ah, yes, at least a handful of them have duplicate warnings now.
This is because a warning does not halt execution, so when I re-check the inheritance at runtime it emits it again.
We should fix that in 7 so that those inheritance warnings are all errors.
 
In 8, you mean? Yeah, those "should be compatible" are not that helpful allowing you to go on
 
So yesterday I shared a request to talk with some PHP folks, but I was told that folks on here are closer to UK time...
My name's Jason Shaver and I'm an engineer with Azure (not marketing, support, or sales) interested in chatting with a few PHP professionals. I'm wondering if maybe, just maybe, we missed the boat on PHP with Azure. Wait, stop laughing =) If your willing to schedule ~15m chat, please go to aka.ms/php2018 and give me your email. I'm willing to give $25 Amazon gift cards (or charity) for anyone I talk with.
 
@JasonRShaver I pinned your message so people have more chance to see it if they wish to participate
 
5:05 PM
Hey, thanks, just noticing that =)
 
np
 
@JasonRShaver I'm guessing you're not allowed to give any info about the upcoming github actions integrations with Azure?
 
@pmmaga Yes.
 
(or get people onto the beta program.....?)
 
When I am looking to talk with folks I'm don't know, I always feel like the boss from office space. Hi there, I'm going to ask you not to do any work and have this non-productive meeting.
sec on the github thing, let me take alook
@Danack, I sent a few emails off to see if I can find someone who can give me some information. toss me an email (jasonsha@microsoft.com) to make sure I can find you to reply
 
5:13 PM
thanks - will do.
 
5:23 PM
@Tiffany It's common to use onclick as an attribute when you have an abstraction over the DOM (i.e. you use Angular/React/Vue)
 
@JasonRShaver ...I'm currently hosting a PHP site under IIS... we're self-hosted. We did look at using Azure as an off-campus site in case we lose electricity. It has happened once, all the servers died.
 
The reasoning being that onclick on an actual DOM element means that your handler must be global
Whereas in, say, React, it doesn't.
 
Ha -- given this code:
interface Collection extends IteratorAggregate {
    function getIterator(): Iterator;
}

class SomeCollection implements Collection {
    function getIterator(): Generator {
        foreach ($this->data as $key => $value) {
            yield $key => $value;
        }
    }
}

$some = new SomeCollection();
echo get_class($some->getIterator());
I get these opcodes:
L1-16 {main}() /home/levijm/Projects/php/php-src/Zend/tests/return_types/generators003.php - 0x7f04dd08d280 + 11 ops
 L2    #0     DECLARE_CLASS           "collection"
 L6    #1     DECLARE_CLASS           "somecollection"
 L14   #2     NEW                     "SomeCollection"                          @0
 L14   #3     DO_FCALL
 L14   #4     ASSIGN                  $some                @0
 L14   #5     VERIFY_VARIANCE         "somecollection"
 L15   #6     INIT_METHOD_CALL        $some                "getIterator"
The VERIFY_VARIANCE bit is out of place, but it kinda works haha
 
So you'll completely ignore variance during compile time?
 
@pmmaga Not exactly. Any known issues are reported at compile time, but if it can't find the CE at compile time then it will defer to runtime.
 
5:28 PM
Wait, class names are case insensitive?
 
@MadaraUchiha Yes.
 
But not method or function names
 
@MadaraUchiha alright. Thanks. I was wondering cause there were a few elements with onclick attributes in the vendor's, and it caught my attention cause I only see those with '00 sites anymore. I'll have to go through their code and make sense of the context of the elements they're using onclick on.
 
@MadaraUchiha Those are also case insensitive.
 
5:29 PM
@LeviMorrison makes sense
 
Variable names?
 
Variables are case sensitive.
 
Huh.
TIL.
@Tiffany Yeah, that's still a no-no, then.
 
@MadaraUchiha Not to be confused with $NoNo apparently
 
@Machavity That gave me NaN flashbacks.
 
5:35 PM
@MadaraUchiha No such thing in PHP #yolo
 
I remember discussion about making either class names or method names case sensitive or both, and the Tony-who-used-to-cause-flame-wars-on-internals didn't like the idea.
 
@Machavity Is that so?
!!> var_dump(acos(8));
 
[ 5.6.38 - 7.3.0rc5 ] float(NAN)
 
Huh. TIL
 
5:36 PM
@Tiffany I can imagine, it's a risky backwards incomaptible change in either direction.
 
Someday PHP will proablbly merge wholly with JavaScript and just be called PScript
 
I've once fixed a bug with NaN by switching a trenary around :D github.com/php/php-src/pull/2648/…
 
!!> var_dump(acos(8) === acos(8));
 
[ 5.6.38 - 7.3.0rc5 ] bool(false)
 
😀 Gotta love NaN.
 
5:39 PM
lol
 
Fun fact: npmjs.com/package/number-is-nan is a >6M monthly downloads library
It's a polyfill for Number.isNaN() a function to determine whether the value passed to it is NaN
 
!!> var_dump(acos(90));
 
[ 5.6.38 - 7.3.0rc5 ] float(NAN)
 
it uses radians... decimal radians anyway
 
5:42 PM
@Tiffany acos accepts values between -1 and 1
You're thinking of cos.
 
I was trying to see if it'd accept degrees
I haven't taken trig in so long though... I could remember this stuff if I forced myself to read through it, but I don't wanna, at least not today
fighting a cold
 
@LeviMorrison btw, can't/shouldn't it verify the variance before assigning?
 
20 mins ago, by Levi Morrison
The VERIFY_VARIANCE bit is out of place, but it kinda works haha
 
:P
 
I'm looking into that right now. At a glance I don't see why it's out of place. The code properly detects the correct place in the input, but the output order is wrong.
My guess is it has to do with the opcode functions I used, which I'm not familiar with. Just copying what I see other things do and hoping for the best.
 
5:49 PM
@LeviMorrison If you want to try out a specific order that may be the only legitimate use-case for this :P
for debugging that, it may prove useful
 
6:01 PM
Can PDO support multiple SQLite databases or can it only abstract one at a time?
 
@Allenph Don't see why not, you make a new instance with a different connection string, you should be good to go...
 
Well, I mean I can do that yeah. What I meant was the SQLite CLI allows me to hold multiple connections and I was wondering if PDO would allow me to do that as well. I would like the use the SAME PDO instance to abstract multiple connections.
 
@Allenph So... like a connection pool?
 
Sure. Apparently I'm not Googling the right thing. I've never actually used PDO this way before.
 
I don't think that PDO has a pooling capability.
You normally don't need a connection pool if your script's lifetime is one request.
 
6:06 PM
That explains why I've never done it before.
Yeah. I have multiple SQLite files that need to be traversed in one query. I can just do two queries on two separate PDO instances, but if I could avoid it I was going to.
 
Wait
If you have multiple connection strings, you can't use a connection pool.
A connection pool is when you open N connections to the same database at once, and take a connection from the pool, and return it back to the pool when you're done with it, without the overhead of opening and closing connections on demand.
If you have multiple databases (or files, in the case of SQLite) you have to use multiple instances, no way around it.
 
Oh. All right. I see. Yeah. It would be multiple connection strings.
Thanks @MadaraUchiha.
 
❤️
 
So in a case like this would you use a service to use different mappers to get you the result you want, or just inject both connections into one mapper and call it good?
Neither seem particularly clean, but.
 
ThW
@Allenph you can "mount" multiple other Sqlite files into an active connection. sqlite.org/lang_attach.html
 
6:18 PM
@ThW The same way I would normally in the SQLite CLI?
 
ThW
Yeah
 
Cool. I'll give that a go. Thanks.
 
6:37 PM
evenin
 
@ThW That works great. Thanks.
 
7:41 PM
Is there an easy way to debug AST kinds? Do we have reverse lookups for ast kind to name or anything?
Or even pretty print them?
In core, I mean. Can phpdbg do it?
/cc @bwoebi
 
so ... , 4chan is attempting an psyop to make Black Friday sales about racism
there might be some of it hitting the news cycle soon-ish
 
@LeviMorrison nope. but you can install the ast extension
 
Maybe I'll have to.
It's really hard to debug when you don't know what the AST actually looks like lol
 
8:04 PM
@tereško As a joke because it isn't or in seriousness?
 
the difference is kinda in the eye of beholder victim targeted news site
 
anyway, just a PSA, in case tomorrow we see some of it :D
 
8:25 PM
I didn't do something right. Shocker. Given this test:
<?php
class Outer {
    protected $data;

    public function __construct($data) {
        $this->data = $data;
    }

    public function getArrayAccess() {
        /* create a proxy object implementing array access */
        return new class($this->data) extends Outer implements ArrayAccess {
            public function offsetGet($offset)          { return $this->data[$offset]; }
            public function offsetSet($offset, $data)   { return ($this->data[$offset] = $data); }
            public function offsetUnset($offset)        { unset($this->data[$offset]); }
The first opcode is:
 L18   #0     VERIFY_VARIANCE         "class@anonymous\0"+
I think it's supposed to be verifying "Outer", not the anonymous class.
Ah, nope, Outer does not need variance verified; it doesn't have inheritance.
 
 
1 hour later…
9:35 PM
@NikiC I built this using find/replace pretty quickly: ZEND_API const char * zend_ast_kind_debug(zend_ast_kind kind). It does what you'd expect; it's a giant switch that returns a string literal of the name of the enum value.
Do you think core would be interested in such additions or...? I am deciding what to do with it myself, since I will probably need it again but am unsure of putting it into my variance patch.
 
@LeviMorrison Not particularly interested
Having that only really makes sense in conjunction with a full AST dumping implementation
 
Okay. I'll store them as a patch somewhere. Maybe a gist.
 
And that requires a lot more auxiliary data.
 
@NikiC Eh, it was useful enough to print what the ast type was. It was all I needed to debug and fix my issue I needed it for.
Agree that a complete pretty printer would be more useful.
 
9:57 PM
@NikiC Do we have a test for this? bugs.php.net/bug.php?id=76451
Couldn't find a bug76451.phpt but it could have a different name.
 
@LeviMorrison If it's an open bug we most likely do not have a test
 
Okay. I'll put one in -- as far as I can tell my implementation naturally fixed it, as hoped.
Unless I goofed up opcache stuff, wouldn't be the first time ^_^
 
> Harry had earnestly advised Hermione that the young boys serving under her were probably nervous about her being a girl with a reputation for being nice, and that she should pick something scary that would reassure them of her toughness and make them proud to be part of her army, like the Blood Commandos or something.

Hermione had named her army the Sunshine Regiment.

Their insignia was a smiley face.
 
evenin
 
I almost wheezed from laughing after reading that
 
10:20 PM
@bwoebi This always skips for me; are you sure this is working as intended? github.com/php/php-src/blob/master/Zend/tests/…
Or maybe I just never have opcache enabled ..?
Somehow even though the test turns it on.
 
I reject your fault attacks and substitute my own usable API
(WIP, rough design, needs to be reviewed before adopted, etc.)
 
GET /something/{ID}/arrayOfSubSomethings <-- Should this be a 404 if ID doesn't exist or an empty array?
 
@LeviMorrison Do you have it loaded?
opcache is a dynamically loaded ext
 
@Allenph that seems logical to me, but I don't know if it's correct.
maybe a 302 if there's a reason?
 
10:36 PM
@Tiffany Which one?
 
oooh, it's an XOR. In that case, I dunno. I thought you were asking in general if either were true.
 
@NikiC I bet it doesn't work because it's not "install"'d yet.
Trying that out now...
 
@LeviMorrison I always use an ini file with an explicit zend_extension line for opcache
Though I think if you run tests through make test rather than run-tests directly there might be some magic to load it automatically, at least when running ext/opcache tests...
 
Well, good news: the alias thing is fixed. At least that specific case is.
The bad news is that I broke anonymous classes that inherit from something (in other words, basically all of them).
>.<
 

« first day (2957 days earlier)      last day (1988 days later) »