HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-26 天前Why make it complicated?lemmy.mlimagemessage-square120fedilinkarrow-up1369arrow-down139file-textcross-posted to: [email protected]
arrow-up1330arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-26 天前message-square120fedilinkfile-textcross-posted to: [email protected]
minus-squareHiddenLayer555@lemmy.mlOPlinkfedilinkEnglisharrow-up6·6 天前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·6 天前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!