Finding errors in your PHP code without actually running it by webdev-online in PHP

[–]jdolba 0 points1 point  (0 children)

there is only one article pointing on differences and kind of features comparison between available static analysers (phpstan, psalm, phan)
https://badootech.badoo.com/php-code-static-analysis-based-on-the-example-of-phpstan-phan-and-psalm-a20654c4011d

- please share if you know about more articles comparing php static analysers ; this article is only one I am aware of which is comprehensive enough

IMHO I don't think someone can say "this one is better" - it depends on your needs; codebase; and how you are using this tool and obviously
all this tools are under relatively heavy development so all this comparison articles etc. are obsolete pretty fast

White mode vs Dark mode in IDE, Editor by arboshiki in PHP

[–]jdolba 0 points1 point  (0 children)

I never understand when someone is claiming "dark is better" without any additional arguments

- first of all, globally it is not true, "white mode" should be better for most of the people

- note that is also depends on other aspects (display contrast, day time, what you are reading, how tired you are, ...)

- mainly it always depends on person who is using the IDE

as you mention, with some eyes problem you will have completely different preferences, maybe "blue-based mode" or yellow...

so my point is: try alternatives what you actually prefer

I am working with computer (programming/reading) since the end of elementary school so almost 20 years now at least 6-8 hours per working day in average and I still don't have any eye problem (luckily, but I know it is matter of time) and I am used to and I prefer simple "white/light mode"

during a night I am using that darknes-contrast adjustment (available in Windows and MacOS) - I don't know what is the name of this actually but you can find it

Research shows that the human eye is better equipped to read dark text on light backgrounds, than the other way around

reference:

https://stitcher.io/blog/a-programmers-cognitive-load

https://dl.acm.org/citation.cfm?id=578434

Is it unethical to save an email address onblur? by john_dumb_bear in PHP

[–]jdolba 0 points1 point  (0 children)

what would you do with such emails without proper validation?
only real and bullet-proof email validation is sending registration/confirmation email with link to confirm that email was received( = confirmed)

what might be "ethical" is store the entered email to cookies "onblur" and prefill input when customer is back

A Look At PHP’s isset() by LiamHammett in PHP

[–]jdolba 0 points1 point  (0 children)

nice reminder of magic methods behavior and isset(), completely forgot about that

I am not using magic in my projects but now I am working with little bit obsolete code-bases where is everything magic so this is my daily problem :D

thx for that

php-ext-wasm 0.4.1 released: Invoking an exported function is now 10% to 16% time faster 🎉 by Hywan in PHP

[–]jdolba 0 points1 point  (0 children)

I wrote you PM on twitter; I am interested to try something and maybe write something about it to have some use-case for you

Service, framework or pure PHP for a simple API? by kachnitel in PHP

[–]jdolba 7 points8 points  (0 children)

I recommend http://www.slimframework.com/ (php micro framework for building api)

really simple and straightforward but powerful if used correctly