NerdHouse Social
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
DonjonMaister@programming.dev to Programmer Humor@lemmy.ml · 2 years ago

The difference between an instance variable and a static variable.

programming.dev

message-square
8
fedilink
21

The difference between an instance variable and a static variable.

programming.dev

DonjonMaister@programming.dev to Programmer Humor@lemmy.ml · 2 years ago
message-square
8
fedilink

cross-posted from: https://programming.dev/post/146762

  • jdr@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    Young man, could.you explain your shitpost?

    • Lux (it/they)@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      I said, young man, what the fuck was that post?

    • fiah@discuss.tchncs.de
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      int variable => local scope => my int from the perspective of an instance

      static int variable => class scope => our int, for all instances of a class

      • Bear_with_a_hammer@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        You know what’s funny? In PHP it’s backwards :D

        • fiah@discuss.tchncs.de
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          well of course it is!

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 108 users / day
  • 1.04K users / week
  • 3.23K users / month
  • 10K users / 6 months
  • 1 local subscriber
  • 36.9K subscribers
  • 1.8K Posts
  • 38.4K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • UI: 0.19.7
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org