HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 days agoWhy make it complicated?lemmy.mlimagemessage-square121linkfedilinkarrow-up1365arrow-down139file-text
arrow-up1326arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 days agomessage-square121linkfedilinkfile-text
minus-squareHiddenLayer555@lemmy.mlOPlinkfedilinkEnglisharrow-up6·3 days agoTIL PHP has statics. Also, does PHP actually enforce the type declarations? I’d assume it would but knowing PHP…
minus-squaredan@upvote.aulinkfedilinkarrow-up4·3 days agoIt enforces scalar types (string, int, etc) at runtime if you enable strict mode. There’s also static analysis tools like PHPStan and Psalm that will flag issues at build time.
TIL PHP has statics.
Also, does PHP actually enforce the type declarations? I’d assume it would but knowing PHP…
It enforces scalar types (string, int, etc) at runtime if you enable strict mode. There’s also static analysis tools like PHPStan and Psalm that will flag issues at build time.
so, no. good catch OP!