ThreadSky
About ThreadSky
Log In
bouchery.fr
•
20 days ago
#PHP, is it a fatale error, compile error, true, false or something else?
Comments
Log in
with your Bluesky account to leave a comment
[–]
adrienroches.bsky.social
•
20 days ago
True ? ::class does not check for existence
1
2
reply
[–]
dseguy.bsky.social
•
15 days ago
Not a validation, not a check of existence with ::class.
It works with '1'::class but not with 1::class.
It works with object::class, float::class, but not with array::class or callable::class.
What else? #phptip #phptrick
0
reply
[–]
bouchery.fr
•
20 days ago
xor have a lower precedence than affectation, so ... string(5) "false"
0
1
reply
[–]
bouchery.fr
•
20 days ago
With parenthesis, it's bool(false)
0
1
reply
[–]
adrienroches.bsky.social
•
20 days ago
Interesting. Always use parenthesis even if not needed. Makes things much clearer! Thanks for this.
0
reply
Posting Rules
Be respectful to others
No spam or self-promotion
Stay on topic
Follow Bluesky's terms of service
×
Reply
Post Reply
Comments
It works with '1'::class but not with 1::class.
It works with object::class, float::class, but not with array::class or callable::class.
What else? #phptip #phptrick