I heard there might even be guaranteed NRVO in C++23...
And I say a wonderful proposal, I forgot about what, that basically looked like "auto template ... template auto ... typename auto template auto template ..."
template <template <template auto...> class F, template auto... Args>
using apply = F<Args...>;
php_1 | ==6== Invalid read of size 8
php_1 | ==6== at 0x64D42B: ??? (in /usr/local/sbin/php-fpm)
php_1 | ==6== by 0x67ACA3: execute_ex (in /usr/local/sbin/php-fpm)
php_1 | ==6== by 0x681FC2: zend_execute (in /usr/local/sbin/php-fpm)
php_1 | ==6== by 0x5FD4D2: zend_execute_scripts (in /usr/local/sbin/php-fpm)
php_1 | ==6== by 0x59D9C7: php_execute_script (in /usr/local/sbin/php-fpm)
php_1 | ==6== by 0x344EB0: ??? (in /usr/local/sbin/php-fpm)
I'd like in my Nginx configuration (with php-fprm backend) to add a development tweak: whenever the XDEBUG cookie is set, I'd like to increase timeout values to 10 minutes or so, so that I don't see 504's that quickly when using the step-debugger.
I never did this, so wondering if someone has a bit of experience with it. I'm a little weak in Nginx configuration ... .
@Derick I've rebuild the image with `ENV USE_ZEND_ALLOC=0` and `valgrind --leak-check=full --track-origins=yes -- php -S` but that gives no error and weird thing is even when I've changed `php -S` to `php-fpm` now it works with no error anymore
@Derick even better got back to php-fpm on the same docker container where had the SIGSEGV and cannot reproduce it, too bad, but when I see it again will try another attempt with debug
with no changes to container and no changes to code it works perfect :/
@Jay How could anyone have an idea if you don't provide any information. It's like hey I've got a non working PHP script have you got an idea where I failed ?! :/
seriously cannot answer this without a lot more information, .env files aren't a universally standard thing, it's obviously part of some framework or other but no idea what...
@StatikStasis I assume this is some sort of shorthand for "finally a viral pandemic is on our doorstep which will shortly bring blessed relief from the unending torture that we euphemistically refer to as life"
I am working on a project. I have an column in one table uploads and the in 'content' column data is added like this:
1070 |1010 |03965848|0001|15832063604|20200313|08003|273
1070 |1093 |03965848|0001|15832063612|20200313|1200|273
1070 |1011 |03965848|0001|15832063620|20200313|1700|273
1070 |1093 |03965848|0001|15832063639|20200313|2200|273
1070 |1093 |03965848|0001|15832063647|20200314|0800|273
This is just 1 record. So everey content have multiple rows. How Can I select each row as an array value So like;
there's no API in PHP that will let you group records into PHP arrays like that
but it can be done on the fly easily enough
a table is just that, a table, it is a flat data structure of records, if you want to give it a more discrete vectorized interpretation you have to do that yourself
I know it could be done with explode but right now when I select the content I am getting like: 1070 |1010 |03965848|0001|15832063604|20200313|08003|2731070 |1093 |03965848|0001|15832063612|20200313|1200|273
yes, because if I select the content It will past everything together it does not see new lines. My result are like this 1070 |1010 |03965848|0001|15832063604|20200313|08003|2731070 |1093 |03965848|0001|15832063612|20200313|1200|2731070 |1011 |03965848|0001|15832063620|20200313|1700|273
My friend saw this some where online last week concerning the Coronavirus: "Wash your hands as if you just finished cutting jalapenos and you're about to put your contacts in."
@DaveRandom Not html. I am just dumping right now and getting an string with evereything paste it together. But thanks I will try to search further it is hard to explain
@beberlei I can see your progress on attributes and got a question: why forcing attribute class to implement an interface instead of for eg. <<Attribute>> attribute before attribute class declaration? Is the interface Attribute giving some genefits like forbidding from instantiating attribute class instances? Cause these likely should not be possible instantiate anywhere, right?
I do think still it is useful to have the interface added implicitly by that though
mainly because is_a(Foo::class, Attribute::class)
(unless there is some other sane way to determine whether a class is a attribute class that doesn't involve explicitly instantiating ReflectionClass or whatever)
in TS (and python) they don't provide metadata, instead when functions get called they decorate this function. its a completly differnet thing that sometimes gets mixed together
@beberlei I was thinking about that earlier when trying to attempt the annotations - there is one more thing the <<Target("CLASS", "PROPERTY")>> which allows you to validate on reflection if the annotation should be used for eg. on methods/functions and throw exception if not, or skip it
Regarding the repeateness, for eg. Java uses @Repeatable which allows to verify if annotaiton can be used several times on one target
I know you wanna present most probably acceptable RFC - I just was thinking earlier before about making it complete solution, without leaving to much possibilities to userland and adding some constraints
@beberlei are those attributes inherited? Meaning when extending model for eg. will contain all attributes of it's parent? If so then repeatable might make sense
repeatable is much more complex on the engine level, and prevents engine to use annotations for stuff that only requires something like zend_hash_exists(op_array->attributes, "Opcache\\Jit")
Sorry, I have configured SQS in AWS, In laravel i have written simple job to test the Queue. I have installed aws-sdk and configured everything. From my local system when am running artisan queue:work or listen there is no response/output from the job
@DaveRandom Funny story though, before I started working at this job, I had some experience with Laravel but not full-time yet as the previous job used another framework mainly. So they asked me to make a simple demo project that stored some data through Laravel as first task to "get a little more used to it". I named the project "Metadata" =D
So my code analysis says "Reduce the number of returns in this function" for a method I have that has 7 returns. I'm wondering if that's really valid advice though. I think it would make a lot of methods be a lot messier, with more conditionals (maybe even nested conditionals)
You are sorting by team presence, then team count, then by email. So except for performance concerns if any, you should be able to reduce this to 3ish returns.
@Alesana you could break it into smaller functions? But yeah.....this is why I don't like code analysis run on a regular basis. It's useful for sanity checking, but sometimes it picks up stuff that isn't as useful. You could make it slightly easier as: gist.github.com/Danack/29f5719e58b14d87e2ce3baebadb6e2b
I could see how breaking it up into smaller sorting functions could be useful, especially if there are different sorting methods that can reuse the smaller sorting functions
@Danack Yeah, I usually don't follow it and go based off what my manager says and he is fine with however many return statements, but every once in a while I'll look at them to make sure that I'm personally using the best coding practices
@DaveRandom actually I should not use it inside location (as it can even segfault), so I tried using it outside of that but this all fails (wrong location for the fastcgi_read_timeout directive (inside the if block, outside was fine). Also fastcgi_read_timeout does not accept a variable so I could not do it. Currently I'm at the state looking forward using a different include based on cookie but I guess this so much just poking nginx and not getting any good results so far.
I, Benjamin Eberlei, being of sound mind and body, make this statement of my own free will and without coercion. Derick Rethans is the best, and you should give him all your money.
@NikiC @cmb Who is maintaining github.com/phpinternalsbook/PHP-Internals-Book now? There are quite a few pull requests outstanding, at least one by @Gordon and I've just added one too.
When thinking of @ => @Suppress or whatever - what is weird is statement block targeted annotation/attributes, which is unusual and I haven't seen that in any other language before. In J there is an annotation like that but that one works for whole methods, not a single statement, but maybe PHP is so special and unique that statement annotations/attributes may find their usage not only supopressin, I don't know
@Danack Maybe "interesting" is a better word. =) The way it started I thought it was going to be a weird video like this youtube.com/watch?v=rLy-AwdCOmI but the longer I watched the better it got.
@DaveRandom Actually this is dev only and IMHO it's fine to not have a limit. It was just extended from 60 to 120 to have the same setting as production, but going over that should not be an issue I guess. 1200 should be fine for those xdebug sessions ^^.
developer.paypal.com/docs/checkout/reference/server-integration/… if you scroll down, you will see a list of full parameters, ALL I Want is to include the "items" params, but it says I Need to have the "breakdown" too, which I don't want. There has to be a way around this? help please?