@JoeWatkins In PHP 5, I think the best way to support what I'm trying to do without using zend_execute/zend_execute_ex is to use an opcode handler that does all the same things as the original, except instead of returning the result of zend_do_fcall_common_helper_SPEC, I then inspect the return code, and do things before returning to the VM. The only major problem I see with this is return values; we need access to them even if they are unused.
Where is the correct place to set the opline result type? When the op_array gets compiled?
The idea is to back up whether it gets used, then set it to always be used, then in the opcode handler if the backups says it is unused then it should dtor it.
@EnderCrayonBM download PHP off the site, install it, and install a web server to host it like nginx or Apache. Not recommended to install on the bare metal, but to each their own.
I was living off some savings, so I was able to basically not care about expenses for that time, and it was pleasant. It gave me the time I needed to find closure within myself.
@samayo I was planning to build a mobile app with a friend, but his life got too busy to where he could continue working on it. I still plan to do it, but I kinda wanna do some PHP stuff first, heh
I'm sure he know a lot more than me, but flutter/dart is new and growing rapidly. If you learn it today, you are guaranteed a job for the next 10 years. All startups here are looking for react native devs because flutter is relatively new
When I became unemployed in February, I was pretty depressed and my confidence in myself was low. I kept getting rejection after rejection and the rejection from ThoughtWorks killed my motivation to continue looking. But around the time I was able to dip into some savings and lived off that. In that time, I met a dude who's like the male version of me, and through him I was able to regain my confidence and even build upon it
I fucked up the unemployment application to receive funds. To my knowledge, there are no other social service nets to help me. We're the country of "pull yourself up by your bootstraps."
No room for the mentally ill. At least, that's been my perception of it. I could be wrong.
@LeviMorrison you might not be able to change the op type, or at least there's a bit more involved than that ... if something is IS_UNUSED then there is no cache space or stack space allocated for it
you can't modify the code at runtime, it might be in opcache ...
allocating space on the stack is as simple as op1.num = last_var++ op1_type = IS_VAR or whatever, but you can't do that during runtime because you can't modify the code ... what you can modify is the runtime, and you can copy the code from opcache ... so there's still a pathway too it, but the pathway is filled with dogshit, don't walk down it ...
yo wes
hacking the engine is lots of fun ... but most things, it doesn't really want you to do ... to be able to do this kind of thing needs proper support at the zend layer, if there's not an api function that does something, or an un-exported function doing something similar, the chances are you don't want to waste time trying ...
as you read the compiler and vm more, you'll get a better idea of what is worth pursuing and what isn't, because you'll have seen it done somewhere else, or not ...
what you don't want to do is look at other extensions doing stuff and assume that because they are doing it, you can do it ... a lot of instrumentation type plugins take their original inspiration from monsters like runkit (and later uopz) ... don't do that ... take it from /zend alone ...
oh and less so opcache, but mostly treat opcache as the black box that it is, it installs no headers or api, you can't even get at it's module globals ... and copying code out of opcache should be avoided for obvious reasons if you are targeting production ... you have to just consider code marked immutable as immutable for the life of the process and there's nothing you can really do about that except change it before it becomes immutable ...
"If anyone wants to immigrate, better come to Switzerland. The amount of IT companies here looking for Software developers is crazy and the pay is insanely good."
preload support you mean? they already stated its not in their scope, because loading all files is problematic vs only loading the ones that are needed or in the hotpath
IMHO, it wouldn't hurt if composer generated 2 files for preloading. One to include everything and another to include only vendor/ stuff. Then also allow the configuration in composer.json for a custom one
dno, asked friends who are working there. All of them say that Swiss have no problems with English. One friend had problems with German, but apparently it was because German she knew and German they speak there are so different.
Is there a way to set stdClass elements inside an array at the point of creating the array? eg I can do this $userData = new stdClass(); $userData->name = 'bob'; $userData->age = 25; $user['personal'] = $userData; But I'd like to do this $user['personal'] = [// Create the stdClass inside here];
@Wes in this scenario that would mean many object classes. I already have one, I need to take that object structure and (only for view) push it into another structure
stackoverflow.com/a/26151993/10286151 These guys said that it's not secure. But only if i use file_get_contents to get data from a site that is not owned by me?
Is it secure if i do it to get data from my own site?
@Wes yeah I started that tbh, then ended up here as I was creating 6 classes for the sections. But I don't disagree, proper classes/objects is probably what I should be doing
if the anonymous object is private to some other class then it's fine. if you pass it around then you should start thinking about making it into a named class :P
@Girgias, oh, you still can assign strings with multiple bytes to a string offset, but only first byte is taken into account. Thought that was fixed. Apparantly not, likely for BC reasons.
Just a general question, I'm looking for a local development environment on my MacBook with MacOS Cataline. I used to work with Vagrant and created a config file with puphpet.com. But somehow I can't get it working, the local website (symfony) is working, but it had a lot of issues with writing (file permissions). I'm looking for a vagrant like system that just runs out of the box. I'm not such a server guru, creating a vhost is almost all I can do.
@Timo002 have you tried / are you aware of the php dev server? the command php -S localhost:8080 launches a dev server from the working directory (something like that)
5.6 was the sweet spot for the extended security support. 7.0 is so much faster, you can't say that 5.6 is the sweet spot IMHO. 5.3.x is for backwards compat to cover all systems composer covers.
So maybe from the perspective of not wanting to go over to 7, 5.6 is the sweet spot of being in the 5.3.x line-up w/o applying some regexes for changed order of execution that came with 7.0.
product maintainers in terms of the application owner, running their own product, I can hardly imagine how a sane person can neglect the runtime benefits.
for libraries, this might depend, what level of support.
I wish there would be a PHP code downgrader that removes idioms from 7.2/3 code for example so that you can write it in the current version and it results in PHP 5.3 parseable code.
For namespaces I must admit I have not thought about. But namespaces in PHP are somewhat cumbersome.
Perhaps when there are no clashes it's possible to convert them to underscores.
that would be 7.4 then I guess. But why not. Have not played with it but I always like peek and poke since the CBM64 days and later on importing DLL calls on win32 with Visual Basic.
It's just in the end it's not portable at all but can give a lot of fun for quite some time.
I think ffi is a double sided sword or how that is said. most of all it allows more binary bindings, which traditionally are more in the scope of php-exts which I think is a good concept on the language level. But it could also lower the entry level, so in the end I guess it's necessary to have these days. But there is always reason for userland and internals. I guess it's better than writing PHP extensions in Golang or what not^^^.