this post was submitted on 01 Nov 2023
        
      
      112 points (91.2% liked)
      Programmer Humor
    27029 readers
  
      
      770 users here now
      Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
        founded 2 years ago
      
      MODERATORS
      
    you are viewing a single comment's thread
view the rest of the comments
    view the rest of the comments
 
          
          
Yes but no. Modern PHP lets you put types in function signatures and it will then attempt to convert your inputs to those types at runtime.
JS/TS and Python don't do this. They have optional type annotations that's treated as syntactic sugar. You can use static checkers against this but if you get an error like "expected string got int" you can still run the code. It won't behave any differently because you have annotations.