@user3890317 Javascript is part of the browser, it also does not need to be installed. PHP is for scripting things on the server, and Javascript is for scripting things in the browser.
@FlorianMargaine Over node? How about because I/O is a minuscule part of a web application, and while node (and generally sane async programming) makes I/O easier it makes many other elements a lot more challenging, because you now have to think about the performance of the server as a whole instead of the current request? Oh and also string manipulation (which is all web dev really is) get's very confusing when things don't happen in the order in which you wrote them
Don't get me wrong, I quite like JS and I quite like working with node, but it sucks for writing "web applications", it's much better for creating the supporting architecture, stuff that needs to do very small insular tasks and handle a lot of concurrent I/O (databases etc)
@Jimbo moment
which function?
btw @Jimbo what do you actually need pcntl for?
It's quite possible you'd be better with multiplexing proc_open handles
@DaveRandom I'm with you on this one (except the strings manipulation thing), you have to think about more stuff. I like it though, and I've found that working in a saner language is more relaxing.
@FlorianMargaine I bet but right tool for the right job. Or at least an adequate one. I couldn't imagine node being used to build a website, not practically. Sure capable but not practical. Then again my JS isn't great and I know less about node. Hence the ask :p
@FlorianMargaine It's on the 'to learn' list. But being a real programmer sits above it atm. By that I mean principles which will in turn help me with learning/building other things.
@FlorianMargaine Like I say, I certainly don't hate it, I just think the world has gone a bit mental thinking it does All The Things, which it does, but it does some of them badly
@Fabien that just comes with learning other platforms/languages. You learn how they do, you learn what works well in what situation, etc. And you just get better at architecture.
@Jimbo OK well I suggest you throw away that clone you have of the debian repo, git clone [email protected]:/php/php-src.git && cd php-src && git checkout php-5.4.9
I'm sure because the alternative "no, lets not make php measurable better in every way" would be a stupid response to the question being asked ... we're not releasing it tomorrow, or on its own, but the longer we spend working on master the longer it will take to come about ... three or four people cannot do it on their own ...
@Fabien learn C (for memory management and contributing to PHP), Haskell (for functional), Prolog (because it's really fun), and Lisp (for its enlightenment)
I don't go for this learn X languages either ... pretty much any language out there, give me a couple of days and I'll be writing semi useful stuff in it ... I dunno how it got to be like that, so dunno where to tell people to start ... but I guess keep reading till you feel you can do more or less the same thing ...
@Fabien well.. I had same things in mind, but really I thought and came to the conclusion that I need to realize what's the thing that I want to implement (so will they be useful or not). Unfortunately.. I have no good ideas :\
@Fabien try to debug something with phpdbg (or, much better, C program with gdb if you know what it is) - and you'll see the world as Neo does(at least, on the screen)
hehe, on a serious note though, choose to read generally applicable stuff, and try to apply it where you are comfortable, have most fun or whatever ... if the choice is between "MySQL and PHP" and "Database Design and Programming" read the latter, the former is only applicable today or for as long as you are having fun :)
although you won't really be choosing ... having been told to do it, you will really just be following instructions ... very matrix-esque, I think you'll agree ...
the only really good use I have for C is PHP, it's one of my all time favourite languages and I don't have to defend that statement ... nearly everything I do with it is PHP-centric ...
@Fabien yeah, you need to setup php.defaults with that stuff ... the idea is that you use multi on throw away environments like virtual machines or testing environments, you write a hook to apply your php.defaults patch and [or] download additional hooks and then ./php.multi and you get all your versions ready to run, configured how you require ...
yeah it's quite a long process until php.defaults and hooks are in place ... then easy ... even cron can build php at that point ... if you like that sorta thing ...
@JoeWatkins iirc @rdlowrey kicked it around a bit in Aerys. I imagine we'll look at it for 7 as part of the new streams API that will hopefully happen (contributions welcome)
@JoeWatkins I presume it's reasonably easily possible for an extension to replace function implementations? Would be looking to replace fopen() and friends so that stream resources no longer exist, the functions still do what they always did but work with the stream objects
I am, I'll do it ... you do the streamy stuff, I'll do the rest for internals ... then rfc that, if it gets accepted we made a massive improvement, else, got a cool extension for streams and sockets that doesn't suck ...
@JoeWatkins The idea is to make it a graceful as possible, ideal goal would be not to break anything but just provide a sane API and soft-deprecate the old one
there is talk of removing resources, I say break shit, write the best api you can, and expose it in the most sensible way ... don't spend the next 5 years explaining your reasons for backward compatibility with an old version that nobody will care about by then ...
fopen can return an object, no problem with that, you can have procedural api for objects like mysqli and company do ...
@JoeWatkins Oh yeh, the API will be designed to be as good as possible, then and only then will we look at trying to make the old functions play nice with it
well that won't be a problem from internals ... it's not actually a problem from an extension but a horrible thing to do, so not keen ... but from internals we can just replace everything ...
@JoeWatkins Well I was thinking like an mbstring-style thing, where you have an insular API which can be use on it's own, but you can also optionally replace the string funcs. Bare in mind also that the extension will only be there as a prototyping-type thing to make it work in 5.[67], basically to make sure that it's conceptually sound
I realise it's a horrible thing to do and I wouldn't suggest anyone use any of this in production until it's either baked into the core or is a stable extension for 7
would be okay for prototype, but we want to write a proper patch alongside for an rfc ... when there's an extension I'll provide the tools to hack internals from there, but we should prepare proper patches alongside ...
@Duikboot I used it last year - the documentation is shocking, it's all over the place, and I never got to fake payments ;-) But I might have an IPN script somewhere that might be useful?
@JoeWatkins Indeed, although tbh I'm not entirely sure I like the current situation where the stream functions are in main anyway. The internal streams API should be in main but the userland functions should probably be extracted to an ext/streams
Dammit, I have an idea for creating a new web app. Should be cool to be working on it with more then 1 person. :) It's something that doesn't yet exists but will be pretty handy I guess.
@DaveRandom Should . ignore keys, if it were an operator? What about ['a'=>1] . ['b'=>2]? I wouldn't expect [1, 2], it should maintain non-integer key association.
@AlmaDo But - is implemented in operators that have no knowledge about arrays, to use array_diff you need: 1. include array.h. 2. copy array_diff implementation
@DanLugg What if something exists that for all intents and purposes could be an array (implements \Iterator or whatever), but has an __toString() method?
@DanLugg so presumably you would go strict with types here, in that it only works when both operands are an array? And if that's not the case, use the same logic as now (cast both operands to string)