3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max_parcelas = 10; $arr = []; $range = range(1,$max_parcelas); $base = 2000; $cheio = 2900; $dif = $cheio - $base; foreach($range as $x) { $log = log($x, $max_parcelas); $val = $base + ($log * $dif); $arr[$x] = ['log' => $log, 'valor' => $val]; } print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [1] => Array ( [log] => 0 [valor] => 2000 ) [2] => Array ( [log] => 0.30102999566398 [valor] => 2270.9269960976 ) [3] => Array ( [log] => 0.47712125471966 [valor] => 2429.4091292477 ) [4] => Array ( [log] => 0.60205999132796 [valor] => 2541.8539921952 ) [5] => Array ( [log] => 0.69897000433602 [valor] => 2629.0730039024 ) [6] => Array ( [log] => 0.77815125038364 [valor] => 2700.3361253453 ) [7] => Array ( [log] => 0.84509804001426 [valor] => 2760.5882360128 ) [8] => Array ( [log] => 0.90308998699194 [valor] => 2812.7809882927 ) [9] => Array ( [log] => 0.95424250943932 [valor] => 2858.8182584954 ) [10] => Array ( [log] => 1 [valor] => 2900 ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.92 ms | 404 KiB | 8 Q