- sin: documentation ( source)
- get_defined_vars: documentation ( source)
- cos: documentation ( source)
- print_r: documentation ( source)
<?php
$dt = 0.1;
$y = 2.2;
$v = 10;
$g = 9.81;
$alfa = 60;
$vx = $v * cos($alfa);
$vy = $v * sin($alfa);
$t = $x = 0;
//
$dx = $vx * $dt;
$x += $dx;
$dvy = $g * -1 * $dt;
$vy += $dvy;
$dy = $vy * $dt;
$y += $dy;
$end = $t + $dt;
print_r(get_defined_vars());