3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = []; $range = range(1,36); foreach($range as $x) $arr[$x] = log($x, 36); print_r($arr);
based on UKNE0
Output for 5.4.0 - 7.2.0
Array ( [1] => 0 [2] => 0.19342640361727 [3] => 0.30657359638273 [4] => 0.38685280723454 [5] => 0.44912220085196 [6] => 0.5 [7] => 0.54301656625085 [8] => 0.58027921085181 [9] => 0.61314719276546 [10] => 0.64254860446923 [11] => 0.66914541655289 [12] => 0.69342640361727 [13] => 0.71576274648254 [14] => 0.73644296986812 [15] => 0.75569579723469 [16] => 0.77370561446908 [17] => 0.79062323730228 [18] => 0.80657359638273 [19] => 0.82166134175225 [20] => 0.83597500808651 [21] => 0.84959016263358 [22] => 0.86257182017016 [23] => 0.87497632070001 [24] => 0.88685280723454 [25] => 0.89824440170393 [26] => 0.90918915009981 [27] => 0.91972078914819 [28] => 0.92986937348539 [29] => 0.93966179272858 [30] => 0.94912220085196 [31] => 0.95827237513209 [32] => 0.96713201808635 [33] => 0.97571901293562 [34] => 0.98404964091956 [35] => 0.99213876710281 [36] => 1 )
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/IbH8H on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/IbH8H on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/IbH8H on line 3
Process exited with code 255.