of course php is best, but how do u do in app(web app/browser) notification with 6$/month apache & php? for example if there are 2000 users who need to push a message to when a queue job finishes in php backend?
Laravel lets you run tasks in the background. You just queue up those notifications and then some other task you wrote will come along and start sending them. Apache isn't involved.
Go with PHP
501–510 of 532 posts
Re: Go with PHP
#502Why do most PHP related posts on HN read like repentance ? If you want to promote the language -to the point of buying a domain and making a webpage-, please show interesting stuff, not something that is equally trivial to solve in gazillions of web frameworks written in gazillions of languages.
You can meet people fresh out of university telling you that PHP is bad even though they have never written a line of PHP. They just know.
This is quite bad for the industry as a whole, because it plays right into large companies that is pushing their technology in an effort to subvert web.
Re: Go with PHP
#503PHP 8+ is filling-in a lot of the missing features -- type hints, attributes, named parameters, etc. Nowadays instead of using 'string_you_have_to_remember_and_might_mistype' or abusing associative arrays as in the given code sample, you can usually get full code completion luxury with PHP without magic comments or other workarounds. PHP 8 is still missing a few critical features such as generics and typed resource h…
Re: Go with PHP
#504Earlier quoted context omitted.
You do get XSS protection out of the box in most templating languages, though, and PHP is also a templating language. Take this template: {{ title }} In most templating languages, for a title of " alert(); ", the result will end up being: <script>alert();</script> In PHP, which is a templating language, the equivalent seems to be: But this will print the title unescaped, which is a security vulnerability,…
Templating languages are abstractions on top of other technologies. I don't see how PHP is a templating language. I could write that exact same code above in NodeJS and I'd need to use mustache to escape the output. So you can make the same mistakes in Node, Python. Nobody writes PHP mixing HTML and PHP anymore, and if you do you should run. Shit code is not unique to PHP and I've seen more than my life's share in JS…
Re: Go with PHP
#505Why do most PHP related posts on HN read like repentance ? If you want to promote the language -to the point of buying a domain and making a webpage-, please show interesting stuff, not something that is equally trivial to solve in gazillions of web frameworks written in gazillions of languages.
Because there is a lot of negative propaganda against PHP out there, especially within academia. You can meet people fresh out of university telling you that PHP is bad even though they have never written a line of PHP. They just know. This is quite bad for the industry as a whole, because it plays right into large companies that is pushing their technology in an effort to subvert web.
Re: Go with PHP
#506Earlier quoted context omitted.
Because there is a lot of negative propaganda against PHP out there, especially within academia. You can meet people fresh out of university telling you that PHP is bad even though they have never written a line of PHP. They just know. This is quite bad for the industry as a whole, because it plays right into large companies that is pushing their technology in an effort to subvert web.
PHP sucks though.
Re: Go with PHP
#507Re: Go with PHP
#508Earlier quoted context omitted.
https://symfony.com/doc/current/page_creation.html Apparently there's now something called annotation routes. Which appear to be inferring functionality from comments. You made me look though. I suppose I had it coming.
They are not comments they are php8 attributes
Re: Go with PHP
#509Earlier quoted context omitted.
They are not comments they are php8 attributes
# is a PHP comment syntax. #[foo] is as much of a comment as #foo is.
[0] https://www.php.net/manual/en/language.attributes.overview.p...
Re: Go with PHP
#510Earlier quoted context omitted.
Because there is a lot of negative propaganda against PHP out there, especially within academia. You can meet people fresh out of university telling you that PHP is bad even though they have never written a line of PHP. They just know. This is quite bad for the industry as a whole, because it plays right into large companies that is pushing their technology in an effort to subvert web.
PHP sucks though.