title: How can I randomly execute code 33% of the time in PHP?
body: <p>I'm not so sure how to write this: I want to generate a random number from 0 to 2, then write an <code>if</code> statement which executes specific code only 33% of the time.</p>
  
  <p>This is what I tried to do:</p>
  
  <pre><code>if (rand(0, 3)=="2") { echo "Success" };
  </code></pre>