Is this the right code to calculate a chance of 25%?

```
if(rand(1,100) < 25){
    echo 'succes';
}else{
    echo 'failed';
}

```

And if the chance for success should be 3,5%, I can change the 25 to 3.5?

Or is this better?

```
if (25 >= mt_rand(1,100)){
    echo 'succes';
}else{
    echo 'failed';
}

```