Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tored
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
271.
▲
by
tored
4y ago
Another one, how do I exclude usernames from the search result? Some users has names of popular libraries.
272.
▲
by
tored
4y ago
You can of course argue that any major update that breaks backwards combability the slightest is a dialect of the previous version, but that is just silly. - Looking for PHP 8.2 dialect programmers! - I have only coded in PHP 8.1 dial
273.
▲
by
tored
4y ago
My suggestion would be to create a language that compiles to PHP, similar what TypeScript is to JavaScript.
274.
▲
by
tored
4y ago
Lots of changes. Like built in async, generics, shapes (typed associative arrays) and I learned the other day here on HN that XML templating is built into the language, somewhat similar to JSX.
275.
▲
by
tored
4y ago
Someone has apparently implemented async library with fibers and stream wrappers. https://www.reddit.com/r/PHP/comments/u80gyg/true_coroutines...
276.
▲
by
tored
4y ago
There is actually some consistency, array functions have the same parameter order and string functions have theirs, it just different order between these two groups of functions.
277.
▲
by
tored
4y ago
One important difference is how you will pass the decoded JSON data afterwards within your application, objects are passed as reference and arrays are passed as copy on write, thus if you intent to modify it it can be easer with an object.
278.
▲
by
tored
4y ago
There is nothing in this blog post nor in the PHP 8.2 release that suggests that PHP 9.0 will be different language and not compatible with previous versions.
279.
▲
by
tored
4y ago
PHP 8.2 will probably not add many new features more of cleaning up the language (still important ofc), similar to PHP 7.2 or PHP 7.3. PHP 7.4 did however add a lot of interesting features like FFI, JIT, preloading, typed properties and arr
280.
▲
by
tored
4y ago
It is only for classes not for objects (stdClass). You can mark a class with the attribute #[AllowDynamicProperties] to allow dynamic properties. You can also still implement the __get/__set methods on the class to have dynamic propert
281.
▲
by
tored
4y ago
npm didn't historically do lock files either, thus is was easier to update npm packages unintentionally. npm is also a worse designed cli, just executing npm without any arguments and it will start installing regardless of where you ar
282.
▲
by
tored
4y ago
Beside the technical aspects that others already mentioned, I think there is also a social aspect. PHP vs Node is like the old Apple ads "I'm a Mac vs I'm a PC" where Node is Mac, it is modern and the future, the person
283.
▲
by
tored
4y ago
What exactly? That the PHP standard library historically has been a thin wrapper around C and C libraries, a language you seem to enjoy coding in.
284.
▲
by
tored
4y ago
Full circle because it is better, you avoid the unnecessary moving of state, however it is of course zero benefit of using react at this point.
285.
▲
by
tored
4y ago
There is a very strong movement for using a large framework within the PHP community, like Laravel, upside is that is has helped PHP community to revitalize the PHP stack. The downside is that large frameworks is now considered best practic
286.
▲
by
tored
4y ago
Old <frameset> pages had its charm. You can still use it with HTML5! If I remember correctly was that screen readers sometimes had some difficulty handling a <frameset> page, especially if the were multiple <frame>s. <i
287.
▲
by
tored
4y ago
Only thing missing from PHP now is to programmatically detect tainted strings, i.e. strings that are dangerous like user input, if we had that we could continue with the built in templating and still be sure to escape output at the correct
288.
▲
by
tored
4y ago
Most of these problems stems from moving too much to frontend, making the frontend tilt over. If you keep more logic in the backend much of these problems goes away. Problem is that for every core concept moved to the frontend it still need
289.
▲
by
tored
4y ago
Except for the confusion about terminology the article has some good points. We had an idea a long time ago in the web dev world that we could run the same language in the browser and in the backend. Basically reuse everything and save tim
290.
▲
by
tored
4y ago
You can write BBOM in any language/platform/technology. It is always the programmers that is the limitation, not the chosen technology. Thus you should pick technology that makes sense for the majority of programmers. PHP fits tha
291.
▲
by
tored
4y ago
Basically what turbolinks did.
292.
▲
by
tored
4y ago
One explanation could be that if you are a hammer everything looks like nail. One problem with web dev in general is that we have multiple backend technologies, thus creating a complete client and server rendering framework requires you to
293.
▲
by
tored
4y ago
It has somewhat become better in PHP with preloading and better caches like the inheritance cache.
294.
▲
by
tored
4y ago
If you look at it from a societal perspective SSR is better, it is easier to place servers closer to a clean energy source rather than every client.
295.
▲
by
tored
4y ago
For e-commerce probably checkout and perhaps the buy button needs to be interactive. Rest of it can be normal pages. You can use different approaches depending on what you serve.
296.
▲
by
tored
5y ago
Put into a database, most databases can import CSV files directly. From there you can start create SELECT queries and depending how much processing you need to do you can create intermediate views for multiple steps. After that your can exp
297.
▲
by
tored
5y ago
Correct, garbage collector was added to PHP 5.3, prior to 5.3 PHP did only reference counting. PHP 5.3 was released in June of 2009. Here is a series of articles that describes it in detail https://www.php.net/manual/en
298.
▲
by
tored
5y ago
Only 3x speed increase feels like either did PHP a very good job or the port is not optimized for rust yet.
299.
▲
by
tored
5y ago
PureBasic's new C-backend had the same problem, declaring them volatile solved it. https://www.purebasic.fr/english/viewtopic.php?t=78859
300.
▲
by
tored
5y ago
One possibility is to make a language that compiles to PHP, like what TypeScript is for JavaScript, but not necessarily superset. PHP already has a ton of well tested infrastructure to interact with web servers so you don't want to rei
More ›