3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php while (true) { $rand1 = mt_rand()/RAND_MAX; $rand2 = mt_rand()/RAND_MAX; if (bcmod($rand1, $rand2) != fmod($rand1, $rand2)) { echo $rand1." ".$rand2; break; } }
Output for 7.1.0
Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 4 Warning: A non-numeric value encountered in /in/ZcNAE on line 4 Warning: Division by zero in /in/ZcNAE on line 4 Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 5 Warning: A non-numeric value encountered in /in/ZcNAE on line 5 Warning: Division by zero in /in/ZcNAE on line 5 Warning: bcmod(): Division by zero in /in/ZcNAE on line 6 INF INF
Output for 7.0.0 - 7.0.14
Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 4 Warning: Division by zero in /in/ZcNAE on line 4 Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 5 Warning: Division by zero in /in/ZcNAE on line 5 Warning: bcmod(): Division by zero in /in/ZcNAE on line 6 INF INF
Output for hhvm-3.10.0 - 3.12.0
Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 4 Warning: Division by zero in /in/ZcNAE on line 4 Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 5 Warning: Division by zero in /in/ZcNAE on line 5 Warning: Division by zero in /in/ZcNAE on line 6
Output for 4.3.2 - 5.6.28
Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 4 Warning: Division by zero in /in/ZcNAE on line 4 Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 5 Warning: Division by zero in /in/ZcNAE on line 5 Warning: bcmod(): Division by zero in /in/ZcNAE on line 6
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 4 Warning: Division by zero in /in/ZcNAE on line 4 Notice: Use of undefined constant RAND_MAX - assumed 'RAND_MAX' in /in/ZcNAE on line 5 Warning: Division by zero in /in/ZcNAE on line 5 Warning: bcmod() [http://www.php.net/function.bcmod]: Division by zero in /in/ZcNAE on line 6