3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for($i=0; $i<60; $i++) { echo($i.' --> '.(($i%7)%3).PHP_EOL); }
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0 --> 0 1 --> 1 2 --> 2 3 --> 0 4 --> 1 5 --> 2 6 --> 0 7 --> 0 8 --> 1 9 --> 2 10 --> 0 11 --> 1 12 --> 2 13 --> 0 14 --> 0 15 --> 1 16 --> 2 17 --> 0 18 --> 1 19 --> 2 20 --> 0 21 --> 0 22 --> 1 23 --> 2 24 --> 0 25 --> 1 26 --> 2 27 --> 0 28 --> 0 29 --> 1 30 --> 2 31 --> 0 32 --> 1 33 --> 2 34 --> 0 35 --> 0 36 --> 1 37 --> 2 38 --> 0 39 --> 1 40 --> 2 41 --> 0 42 --> 0 43 --> 1 44 --> 2 45 --> 0 46 --> 1 47 --> 2 48 --> 0 49 --> 0 50 --> 1 51 --> 2 52 --> 0 53 --> 1 54 --> 2 55 --> 0 56 --> 0 57 --> 1 58 --> 2 59 --> 0
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 0 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 1 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 2 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 3 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 4 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 5 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 6 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 7 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 8 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 9 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 10 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 11 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 12 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 13 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 14 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 15 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 16 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 17 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 18 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 19 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 20 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 21 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 22 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 23 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 24 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 25 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 26 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 27 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 28 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 29 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 30 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 31 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 32 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 33 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 34 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 35 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 36 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 37 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 38 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 39 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 40 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 41 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 42 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 43 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 44 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 45 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 46 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 47 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 48 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 49 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 50 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 51 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 52 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 53 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 54 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 55 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 56 --> 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 57 --> 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 58 --> 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/i7UKK on line 4 59 --> 0PHP_EOL