HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 个月前Why make it complicated?lemmy.mlimagemessage-square123fedilinkarrow-up1371arrow-down138file-textcross-posted to: [email protected]
arrow-up1333arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-23 个月前message-square123fedilinkfile-textcross-posted to: [email protected]
minus-squareHiddenLayer555@lemmy.mlOPlinkfedilinkEnglisharrow-up6·3 个月前TIL 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 个月前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.
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!