3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $midi = array(); $a = 440; for($x = 0; $x < 127; $x++) { $midi[x] = ($a / 32) * (2 ^ (($x - 9) / 12)); } print_r($midi); ?>
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Array ( [x] => 151.25 )
Output for hhvm-3.12.0
Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line -1 Array ( [x] => 151.25 )
Output for hhvm-3.10.0
Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Notice: Use of undefined constant x - assumed 'x' in /in/hB5hB on line 5 Array ( [x] => 151.25 )