« first day (3294 days earlier)      last day (1657 days later) » 
04:00 - 13:0013:00 - 00:00

1:00 PM
well maybe @PeeHaa
 
cmb
No-one deserves building PHP exts on Windows? If so, what did I do? ;)
 
well yes but that's voluntary, like me. Masochism is fine, sadism not so much.
 
@cmb which dll you are saying?
 
cmb
@Exception, which DLL are you looking for?
 
its pecl but even if I added that in ext folder and restarted apache then also http_build_url is not working
this added dll is not listing in phpinfo
 
1:20 PM
@DaveRandom Well fuck you!
What do you mean by maybe
huh
?
 
Could anyone help me? I'm new to PHP.

I have a local mysql db with some fields. The following instruction always returns false: isset($_POST['movie_name'])

What may I be doing wrong?
 
@John You are not sending movie_name as a post parameter
 
The database is empty but the "movie_name" field exists
 
$_POST is unrelated to the database
It is populated based on a http request
 
cmb
1:28 PM
@Exception, so it's about pecl.php.net/package/pecl_http
There are no DLLs available for this extension.I've checked the logs
 
@PeeHaa I'm following this tutorial: androiddeft.com/… If you check his add_movie.php file, I do the same thing but mine always goes to the else condition
 
cmb
and obviously the dependency PECL/raphf couldn't be build.
There is a patch in the repository, but no new release yet.
:(
 
@John 1) no you are not, you changed get -> post and 2) what does your request look like
 
sorry I've sent you the wrong section on the link
scroll up to find the add_movie.php please
 
What does your request look like?
 
1:33 PM
here it is ibb.co/SyzTs0C
 
You are setting headers, not the post body
You need to send a application/x-www-form-urlencoded request with body fields
 
ohh -_-
was so stupid
 
I concur :-)
 
Well the reason I manually tried to make the post request is because following that tutorial didn't work
I've already made a question on SO with no luck. stackoverflow.com/questions/58490739/… it's not much trouble, can you take a look at it please?
if it's*
 
Manually creating requests is postman is fine, but you need to have a basic understanding how http works
It may help you if you go to a random website, open dev tools -> network tab -> submit a form and inspect the request and response
 
1:41 PM
yo @PeeHaa you around?
 
I am
Until subway arrives :P
@John BTW is there a reason you don't use an external service for your storage instead?
 
I am trying to write the wotd plugin, but it seems that the Client class only makes json request
 
Like what?
 
but I need to parse html for this plugin
 
aight
 
1:42 PM
So, I thought I might use the makeRequest method, but that is private
 
Hadn't had a need for html yet
Good thing is it's an easy PR for you
:-)
@John Doesn't firebase do stuff like that for you?
 
great, will do that too right now.
 
Maybe add a method requestHtml and call makeRequest from there @mega6382?
 
@PeeHaa Yeah, that is what I was about to do.
 
\o/
 
1:46 PM
@JoeWatkins @NikiC @cmb Is it possible to install a PHP callback with FFI to replace ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type); It fails with unsupported return type :(
 
Also maybe add a exception for non 200 responses and just return the html
Not sure yet about that one, but would be easy to change anyway
 
@PeeHaa should it return a DOM object or html string? Which do you think would be better?
 
hmmm good one
Would be nice if it returns dom I guess
You can use @DaveRandom dom helper for that
 
ok, will go with that one, thanks
ok, let me check that
 
Just install that bad boy and call domdocument_load_html
 
1:51 PM
great, thanks
 
@cmb How can you confirm by seeing logs that pecl http dll is not available for windows
I can show this to my senior..
 
@PeeHaa Now I get this https://ibb.co/qRJP6cz
Are the "Values" supposed to be the names of my table fields?
 
@PeeHaa it seems that the makeRequest method already handles that.
 
Ah yes nice
@John When I search for "unknown column" on that tutorial there are no hits
 
I think the error is produced with this line of code: mysqli_error($con);
 
2:01 PM
/me waves from PHPWorld
Derek is going on stage in a minute
 
livestream it!
 
@lisachenko I don't understand what you mean
 
@MarkR iof the internet was better I would
 
@NikiC I want to update zend_compile_file via FFI, I've imported all required definitions and can erase it, but it isn't possible to write it via FFI $php->zend_compile_file = function () {echo "Done"; }
FFI internal error. Unsupported return type
 
2:08 PM
@lisachenko what's the stack trace?
 
@ircmaxell It's from FFI itself, see lxr.room11.org/xref/php-src%407.4/ext/ffi/ffi.c#875, ends at zend_ffi_return_unsupported()
 
@PeeHaa do you have any idea of why that error appears?
 
@lisachenko on line 931?
 
yes
 
2:13 PM
if so, is the return type defined? (meaning did you declare it correctly in the signature)?
 
But what should I define as a return type? CData?
 
Noo, the c type, not on the function itself
 
@Danack I seem to remember getting something like this a while back, ignored it
 
aka ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type);
how are you declaring it?
 
cmb
@Exception, go to https://windows.php.net/downloads/pecl/releases/http/3.2.1/.
Usually, there would be downloadable ZIPs, but since there's only the log/ folder,
enter that, download one of the *-logs.zip files, and have a look at configure-*.txt.
 
2:16 PM
@ircmaxell this is tricky part, via FFI you can't create such a type (or I don't know how to do it) php.net/manual/ru/ffi.examples-callback.php describes a way to use PHP closures as native C callbacks, but how to make it type compatible?
 
@lisachenko how are you declaring zend_compile_file in your header?
 
__declspec(dllimport) zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type);
As-is
I have a guess, that FFI implementation misses additional check if PHP function callback returns a CData type
and check it's internal type
 
does FFI know about __declspec(dllimport)?
it has nothing to do with the return of the php callback
this is a pre-call type check on the signature of the function pointer you're trying to assign to
and is zend_op_array defined?
 
2:37 PM
@cmb It is showing http | shared what does that mean?
 
cmb
@Exception, no it's about the last three lines:
Enabling extension ext\raphf [shared]
C:\php-snap-build\php-src\php71\x64\php-src\configure.js(1531, 2) Microsoft JScript runtime error: Object doesn't support this property or method
 
@cmb But this error does not mean that pecl is not available for windows for 7.0
 
cmb
@Exception, yes, this error only means that this package couldn't be build for Windows.
Generally, DLLs for PECL extensions are only build for supported PHP versions (https://www.php.net/supported-versions.php).
 
3:00 PM
@ircmaxell ask him what he thinks of Brexit. /s
 
@Danack we chatted a bit about that already
 
@Jimbo I had a chat with the Jason chap. I got the distinct impression they were at least thinking about making a managed PHP platform or at least figuring out how to support it better in Azure.
 
How do you know what opinion a British person has about Brexit? Like Vegans, they'll tell you :P
8
 
Does anyone know where STDOUT gets sent to in the PHP built in server? It seems to disappear to nowhere, which is moderately surprising.
 
Doesn't it get sent to the request?
 
3:11 PM
each php sleep() creates new fpm-child-process – #78742
 
@LeviMorrison apparently not:
$stdout = fopen('php://stdout', 'w');
fwrite($stdout, "Why can't I see this");

echo "This is moderately suprising.";
output:
# curl 127.0.0.1:8080
This is moderately suprising.
 
isn't it php://output ?
 
@JoeWatkins that does reach the output, but I was debugging something in an extension with printf...(yes yes, use a debugger Dan).
 
cmb
fprintf(stderr, ...) ?
 
I see it in the output of stdout on the log of the php process
ugh, words are hard today, but I mean:
edro@mars ~ $ php -S 0.0.0.0:8080 test.php
PHP 7.2.19-0ubuntu0.18.04.2 Development Server started at Wed Oct 23 16:14:26 2019
Listening on 0.0.0.0:8080
Document root is /home/pedro
Press Ctrl-C to quit.
Why can't I see thisWhy can't I see this
 
3:17 PM
@ircmaxell yes, it knows, at least in the vectorcall snapshot
 
@cmb yeah, that behaves more as I'd expect.
 
@ircmaxell yes, I've figured out this, but to make PHP callbacks compatible with all other possible types, there should be extra check: if PHP callback has a return type and if it's CData, then proceed with run-time type check of CData type.
Otherwise FFI can't be used for every possible callback type...
 
@pmmaga that is what I see for userland code. stdout when written to from C code seems to go nowhere.
 
I have an extra-dirty-ugly solution: to craft an assembly trampoline code in memory, make this region executable and emulate PHP closure call from this assembly code. Then cast this region to void* and assign to the zend_compile_file hook.
 
Could anyone tell me what am I doing wrong and I get this message when trying to make a post request? https://ibb.co/VTkq3Tg

This is the code: https://ibb.co/DDzjr5c
 
3:32 PM
Off-topic: When I was curious of the value of something I wanted to sell I would usually go to eBay and filter by "sold listings" to get an idea. I found out yesterday about explore.ebay.com and then clicking on "What It's Worth" on the right and searching for items. Actually gives you some really interesting sales history for the past 90 days on the eBay marketplace. Example: i.imgur.com/264hyaY.png
Disclaimer: I don't work for eBay nor currently sell on their platform... though reading back over what I wrote I feel like some kind eBay shill. I just thought it was interesting.
 
@John Biggest problem is you're doing prepared statements wrong. Replace the PHP variables with ? in your SQL
 
Thank you a lot!
 
@Machavity @MadaraUchiha Any new news on the banned moderator debacle from a few weeks ago?
 
yo @PeeHaa I have made multiple PRs to multiple repos, please check when you get some time, thanks <3 :)
@StatikStasis link?
 
@mega6382 Lemme dig it up- one sec
 
3:40 PM
@StatikStasis AFAIK, we're still in the same boat. meta.stackexchange.com/a/336236/244695
@mega6382 Start here
 
thanks
 
@Machavity I have not seen this response from Monica- so that is new to me.
 
Provide a configure flag to disable SIMD optimizations – #78743
 
tf is going on with SE, why are they doing this, " they think I will in the future violate a thoughtcrime-style provision of a Code of Conduct change that hasn't been made yet", sounds like some dystopian shit.
 
Wes
3:58 PM
i want to kick in the teeth whoever thought USB 3.2 Gen1 Type-A was good naming
 
@mega6382 If they had started with this instead of firing a well-known multi-site mod, it might have gone better
 
@Wes that isn't even a proper name though. Do you mean USB 3.2 Gen 1×1 or USB 3.2 Gen 1×2 ?
/me ducks
 
@Wes I blame standards. But then again, maybe naming is hard
 
@Wes I've completely lost track of USB… as a guess, is that the old style connector, but capable of 10 Gbps?
 
@Machavity maybe
 
4:10 PM
@mega6382 Well, it would have avoided the climate of fear they created
 
@lisachenko fair enough
 
@ircmaxell sigh... /me deletes manual opcode crafting slide
 
4:30 PM
Hdbebe
 
Allow to define FFI callbacks with CData return type – #78745
Unexpected __set & __get behavior – #78744
 
4:45 PM
Methinks that uninitialized thing is going to keep biting
 
4:59 PM
Why the hell is __set / __get being called at all there?
 
Because Marco
 
I need more context there.
There's no reason __get / __set should be called.
 
Even inside the class, because the variable is uninitialized, it goes through __get and __set. @NikiC wrote a patch but it broke some of Ocramius's PHP voodoo.
 
Well boo-hoo for him.
 
5:04 PM
@NikiC Are Dmitry's numbers for union typed reference type checks accurate? 3x compared to no type? That's fine by me, as long as simpler cases have less overhead.
 
Hi, How come when I type the following block of code in a file named page-archives.php, the template name changes? For example, if I typed in "Archive2" the dropdown list would display Archive2. I thought comments didn't have any effect.
<?php

/*
Template Name: Archives
*/

?>
 
Won't get an argument from me on that one Twoski xD
 
@MarkR Ugh… that's a mess.
 
Yeah. I had to revert a few hundred changes in my code because of it.
 
I'll give a +300 bounty to whoever answers me
 
5:08 PM
$ or £ ?
 
@MarkR Reps
 
Oh, those sound like zimbabwe dollars.
 
@MarkR Seems there needs to be another state for declared, but uninitialized props.
@JossieCalderon Obviously whatever framework you're using reads the comment block and pulls data from that block.
 
5:21 PM
@NikiC Related to bugs.php.net/bug.php?id=78744, the issue is not that __get is returning null, it's that __set is being called for $this->bar = $bar in the constructor.
That's… rather unexpected.
 
with adodb and prepared statements [e.g: "INSERT INTO table (column) VALUES (?)", array("myvalue")], do you know how to preview the sql prepared by adodb, before execute?
 
@Trowski Here you go sir, have 300 reps.
 
@JossieCalderon I shall treasure them, always.
 
@PeeHaa ok, so how exactly does the storage work in this new bot? Like for when configs like wotd on|off needs to be stored or for things like dad jokes etc?
 
English idioms/proverbs question: There's a saying in Hebrew: "The shoemaker goes barefoot", which means a person who gives/sells something to others that he himself lacks.
Is there a similar proverb in English?
 
@Danack Huh, TIL. Thanks
 
English "oh, that's a nice phrase you have, mind if we ..... TAKE FROM YOU?"
 
@Danack We have loads of pretty cool phrases and proverbs that originate from the bible
One I like is putting money "on the deer's horn" where the word for "horn" and "fund" are the same in Hebrew (and for this exact reason). The proverb means "making a bad investment". In biblical times, they'd use hollow animal horns to store valuables and money, but deer's horns would be open and hollow on both ends, so putting money there would cause it to slip out and be lost.
@DaveRandom You should at least use https:// next time
It's visibly glaring in the address tooltip
 
@Trowski No, that's a different issue
 
5:52 PM
@NikiC Well, the exception is thrown when $this->bar is accessed in the constructor.
Which is because __set is called (which doesn't actually set bar)
 
Yes, see the linked bug
 
So… yes, it is because of __get returning null
 
Which he also opened, so he should realize that it's a separate issue...
 
The point is that calling __set when accessing a declared property is completely unexpected.
 
Yes
Duh
Tell me something new
 
5:58 PM
The CIA probably have a file on me.
 
@LeviMorrison Haven't tried it myself, but I wouldn't be surprised. I personally don't care really care about that case.
 
The contents of which are almost certainly "do not waste any more time on this person."
How can I print extension global variables that are accessed through the TLS macros in GDB?
e.g. if I have IMAGICK_G(progress_monitor) - how could I print that?
 
@NikiC Unexpected as in I can't believe 7.4 is going to ship that way. There will be a lot of "Why typed properties are broken" articles.
 
cmb
@Danack, in an NTS build like imagick_globals.progress_monitor
 
@Danack I use a build without ZTS, myself.
 
6:05 PM
Whatever, obviously I'm late to the party on this issue and it's been well explored. Just another reason to tell people to avoid __get/__set.
@NikiC Is it worth me exploring another state for properties, or is there no way that would work?
 
@cmb thanks.
 
@Trowski Another state would be good, my main concern is being sure that all code can handle it
Everything already needs to (and does) handle IS_UNDEF
 
A different state would work, as would a __superDooperInterceptEverythingSet for proxies
and check if it exists at the very top of the function
 
What about more state on IS_UNDEF rather than another IS_* type?
 
6:21 PM
Would this be viable: Change IS_UNDEF to 3 and modify other IS_* constants to not set the lower 2 bits, add IS_UNINIT = 1 and IS_UNSET = 2. Most places comparing == IS_UNDEF can be changed to & IS_UNDEF or & ~IS_UNDEF. Then go change the few places that matter to check for the other two.
Swapping to bitwise looks to be mostly find-and-replace.
There's a few switches that would need to be changed manually.
 
and allow every var to be initialized to that type, or do it auto?
 
Every declared class prop starts out as IS_UNINIT.
Unsetting a class prop changes it to IS_UNSET.
Anything else can continue using IS_UNDEF.
 
Seems like it would work if it had the same behaviour on access. I think ideally set itself would need a fix... as unsetting a typed property makes no sense whatsoever IMHO.
 
I assumed doctrine used unset on declared properties.
 
As a way of forcing __get / __set behaviour was my understanding. I'm just wondering if internals considers it sane behaviour, or if it would be better to add an intercept-everything routine.
 
6:34 PM
I'd like to forbid unsetting all declared properties, typed or not. This would break the fundamental model of some ORMs, so it's probably a no-go, but seriously, that's a really unfortunate thing.
 
How the heck do I get my archives to display like this? boldanddetermined.com/archives
 
@LeviMorrison That would make sense, but yep, I'm sure that's a no-go.
 
@Trowski That's definitely a no-go for 7.4
But we might be able to use a type flag
 
what is this ticket on reddit? bugs.php.net/bug.php?id=78599 "as the fixes have been released i publish the exploit" ??? i dont see fixes
 
A fix got pushed to git but a new version wasn't released AFAIK
 
6:38 PM
@NikiC If you have another idea of how to fix it, please run with it.
 
What about requiring an interface being used to enable "old" behaviour? Making everything else sane-by-default?
 
@Trowski I'll look into it tomorrow
I think it should work, but you never know what crazy assumptions turn up...
 
7:03 PM
Is there some trick to getting GDB to run through run-tests? I have an issue I have only been able to reproduce through run-tests.php
I did set follow-fork-mode child -- didn't seem to affect anything.
 
@LeviMorrison can you modify the generated .sh file to use gdb? thats my approach
 
Good idea
Well... it segfaults.
That's my clue to why my patch changes the result; I installed a segfault handler.
(Which is somewhat obvious, but the question is why if I don't install the signal handler it doesn't segault)
 
7:41 PM
@Wes While I won't begrudge you that the Corsair is overpriced, those aren't really the same thing.
 
Wes
they are not
but corsair only sells "premium individually sleeved" and nobody cares about that
then they only sell them in pairs... just in case you want to power 3 motherboards at the same time
 
Also… capitalism isn't really the correct thing to blame there.
 
Wes
finally, they cost 1/3 of the actual psu
which is ridiculous
i was being ironic. tsk... programmers :D
 
Yeah, selling in pairs is just moronic.
@Wes Fine fine, I'll go back in my dark corner :-P
 
@Wes Well, it's not like the US has a major party saying Capitalism is bad or anything :P
 
Wes
7:49 PM
@Trowski :B
@Machavity tldr?
 
@MadaraUchiha This is fascinating to me! I love hearing stuff like this.
 
8:43 PM
i need some help with a regex split: pastebin.com/2NYvX9Jz
 
22 line mod rewrite / .htaccess debugger: gist.githubusercontent.com/hakre/…
 
@Machavity This... whole... confusing... time we leave in- makes my head hurt sometimes. web.archive.org/web/20191023011602/https://…
 
@StatikStasis You're not alone, sadly
 
@Machavity I remember in the past 12 months reading a list of the different pronouns "Ze, etc." I just use gender neutral or their name to avoid the lot of it.
 
And that seems to be the problem "Disengagement" appears to be the bridge too far that Monica crossed
 
8:58 PM
Because she would not use a specific term?
A gender neutral term was considered offensive or to be disengaged?
 
i believe she rewrote to avoid using one
 
@StatikStasis wat
 
Q16; forcing someone to use a specific pronoun- even if the one used is considered neutral.
 
@Machavity But some have beliefs that doing so breaches their own convictions; neither should be forced... which is the point of using some neutral noun.
There has to be some compromise.
 
9:06 PM
they compromise is in ze making.
 
@hakre I'm offended =P
 
<- pronomaons: our/ours + nick
Yes please feel offended, but you need to have an accepted reason to be offended.
 
"accepted" Who is the committee?
 
@StatikStasis Is you ok for you btw?
 
@hakre ve haf vays of making ze pronouns verk
 
9:10 PM
You can call me whatever. =)
 
isn't ze slang for the?
 
@hakre It's also how native German speakers pronounce "the"
 
Even "ze" is considered neutral... but someone will be (or already is) offended by the use of that. There is no end to the madness.
 
Whenever I monologise I'm totally offended by the wrong pronouns I need to hear. I'm so happy SE picked up the topic.
 
I feel bad for many of the science and biology teachers today. Not to mention anyone who has to work with DNA for sex determination.
 
9:14 PM
@StatikStasis Worth a read
 
It's got to be hard not to offend students when they have so much more to learn.
 
English sucks, and then you die. — Shog9 ♦ Oct 19 at 18:22
 
Maybe if you put this energy into not being a dick, then it won't be a problem. "Not to mention anyone who has to work with DNA for sex determination." they're absolutely fine - accordalliance.org/faqs/…
 
No need to sexualize language then.
 
9:17 PM
Sounds about right
 
I feel for those who struggle with this in earnest. They've been victimized by those trying to help them. Hypersensitivity is helping no-one
 
The policy is barely enforceable. SE really put themselves into a corner, and invited trolls to essentially do what the flying spaghetti monster did to religion.
 
In other news, I find this quite astonishing
 
Differentiating sex/gender the way we're doing now is a new thing. That's what I mean. It is extremely difficult.
 
9:20 PM
Also lost ~30 mods over this...
 
Also I find the style very little inclusive.
 
i need some help with a regex split: pastebin.com/2NYvX9Jz
 
@BenCoffin You posted that earlier. There's no regex in there, tho
 
@Machavity i didn't think any body peeked.. i was showing what to split, and how to split it. But i couldn't figure out the regex.
 
There isn't a question in there either.
 
9:26 PM
@BenCoffin Have you heard of regex101.com? Superb tool for testing regex on the fly
 
i need some help with a regex split: twitter.com/Gaohmee/status/1186807039902674945
 
@Machavity I usually use phpliveregex.com and have been in there for some time, trying to figure this one out.
 
@Danack No need to be mocking
 
Well, i know it's lazy, but i'm going to just use a library somebody wrote for this.
thx folks, have a nice evening.
 
9:41 PM
PCRE?
gn8 urs.
 
Could someone point me to where user-based class definitions are turned into class entities in PHP?
err in the internals php-src
nm zend_compile_class_decl
 
Jpv
9:58 PM
Hey guys anyone here works with laravel? I'm having issues running a query.
I have 2 tables that I'm joining. However, one of the tables will likely always have multiple rows. is there any way to nest it?
DB::connection('fbi')
->table($soTable)
->join('soitem', function($join){
$join->on('so.id', '=', 'soitem.soId')
;
})
->where('so.statusId', '=', $issuedId)
->orWhere('so.statusId', '=', $inProgressId)
->select('so.*','soitem.*' )
->groupBy('soitem.*')
->get();
 
Jpv
10:11 PM
Im looking to get something like :
Result{ 0 =>
['so.id'] = 123123
[so.name'] = blah blah
['soitems'] = [
0 => [
['soitem.id] = 423
['soitem.name'] = line item
],
1 => [
['soitem.id] = 545
['soitem.name] = line item 2
]
]
]
 
0
Q: Which plug-in is this?

Jossie CalderonHow do you make an archive page like this? Certainly there must be a plug-in but I've spent 8 hours and I'm unable to find it. https://boldanddetermined.com/archives/

 
10:33 PM
@JossieCalderon Surely a question like that is offtopic
 
Well, where would I go? I thought it was here because it involved PHP
 
I was talking about your question on the site
50
Q: Update our FAQ and abandon theme/plugin recommendations

kaiserWe've had the discussion about what is on-/offtopic in chat and different other channels often enough. And we know one thing for sure: Plugin/Theme recommendations are (almost mostly) »shopping questions«. They add exactly no value to the site. So let's make an update to our FAQ and get rid of t...

 
Question to those in the know. I'm trying to learn why instance type checks are considered 'slow' (re: union types comment by dimitry). I'm looking at the instanceof_class and instanceof_interface functions, but I'm not seeing any caching?
 
D'oh...
:47662862
 
Is it the recursive instanceof function / class type checks which are slowing it down?
 
10:43 PM
@MarkR hypothetically, you could ask him "is it actually slow, or do you just not like the idea, and so finding reasons to criticise it?".
 
Seems like a bad idea to say that to him especially as Nikita invited his comment :P
 
> I think PHP already took wrong direction implementing "typed references" and "type variance".
 
But actually, I was pondering the limitations of adding a 'last checked type' in the class entry.

if (instance_ce->last_matched === ce) {
/* no need to do the rest */
}
 
I can't comment on the typed references part, but not liking variance in a type system is 'odd', to say the least.
 
I had assumed that a single linked list of all of the parent class / interfaces was created at link time but I can't seem to find it.
 
10:50 PM
@MarkR To be honest, we can probably improve the performance of these calls in general, but for unions I expect it to be slow because of the union.
 
Hmm actually I do see zend_class_entry **interfaces in zend_class_entry, but a recursive call in the instanceof function
 
@MarkR It's been a while since I've had to do anything performance related, but a lot of the time it's hard to tell what would be faster or slower as memory performance is a bigger factor than code speed a lot of the time.
 
Fair point.
 
Trying that and seeing what the performance is like would be the only way of knowing. i suspect though, that just have a big old block of memory that type checking info would be better than distributing it along side the class entry info.
 
I've yet to find the opcodes which deal with those checks at a runtime parameter / property level, but I'd imagine a cache slot could be used for storing if the last type passed. I'd imagine for most things like loops and such, it's the same type every time
I don't pretend to fully understand the VM though (or even 5% of it)
 
11:54 PM
gist.github.com/marandall/b28cde8639c91f37d4eba2d492196980 ~ 19% difference in a loop of 1m instanceofs a deeply nested (3rd level) interface. Probably not worth it considering it's so quick anyway.
 
04:00 - 13:0013:00 - 00:00

« first day (3294 days earlier)      last day (1657 days later) »