Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Use Subversion and post-commit hook.
  2. Debian/Ubuntu and Gentoo are the only ones I've used personally. We use CentOS on the PHP Freaks servers, but I don't like it.
  3. Doing like $foo = "hello $bar[baz] world"; is perfectly valid though.
  4. That's still illegal, so if you're going to break the law, why not pirate the finished version?
  5. Like a quine?
  6. It might also be worth checking whether your university/department is in MSDNAA. You can get a lot of free shit from there, including their operating systems.
  7. Right. From that article:
  8. There is no direct upgrade path from XP to Win7 as far as I know. You would have to upgrade to Vista and then to Win7.
  9. You mean like /tmp?
  10. About 74% of the inbound traffic comes from search engines, so I would be surprised if it's difficult to find.
  11. Uninstall Visual Studio.
  12. GA browser stats for the last 30 days attached. [attachment deleted by admin]
  13. Calling static methods is faster than using objects. If all you're doing is calling static methods on objects (of if you do it interchangeably) there is no point in using classes in the first place.
  14. As long as people keep their software updated, I don't really care what they use.
  15. Fail. We already have one: http://en.wikipedia.org/wiki/Sarcasm#Sarcasm_mark
  16. The Terms of Service applies to all members (staff or otherwise) and covers licensing of submitted content.
  17. A signed integer, 2147483647 will be the W2K38 bug. Lets leave the problem for our children to deal with. Yes, but what happens when you represent the time as the number of seconds after after the Unix epoch using a signed integer and then want to represent '69? That is the problem with representing '69. Like you cannot exceed the upper bound, you also cannot go below the lower bound.
  18. 32-bit integers have limited range. You can point to exactly 2^32 different timestamps. When you go too far into the future or the past you're fucked.
  19. He is waynewex, duh.
  20. That's because you need to choose either the "dist" or "recommended" version as your php.ini file. You can also write your own from scratch of course, but I haven't heard of anyone doing that.
  21. Why don't you just sort it using your query?
  22. No. It's just Tom who was messing with stuff.
  23. Maybe you should tell the SMF team that. They don't seem to have figured that out yet.
  24. No. If you don't define a constructor, it's the same thing as defining a constructor with no body and no parameters. In PHP, you can pass an infinite number of arguments to a function. The extra ones will just be discarded. In your case, the return value of getName() would always be NULL. Variables in PHP are always initialized to NULL until they're given a value. This includes when you use an undefined variable (which you shouldn't). Only if you have something you need to do in the constructor. It won't hurt doing it though. You just need to remember that if a child class defines a constructor, the parent class' constructor will not be called automatically. That becomes your responsibility when you define a constructor. Mostly it's a matter of style. A reason might be that if you don't define properties, they won't be inherited by children classes and you cannot control the visibility. Also, the constructor is a real method that you can actually call. This is often done in a child class by doing like parent::__construct($something);. It also makes it easier to see what is part of the constructor and what isn't when it's defined in its own method. They are not predefined variables. The foreach loops works by iterating over all the elements in an array (though foreach can be used on objects implementing the Traversable interface). For each element in the array it will bind the value of the key to $key and the value of the value to $val when you use $key => $val. You can choose whatever name you want.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.