Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402]
1 <?php 2 3 use Complex\Complex as Complex; 4 use Complex\Operations; 5 6 include(__DIR__ . '/../vendor/autoload.php'); 7 8 $values = [ 9 new Complex(123), 10 new Complex(456, 123), 11 new Complex(0.0, 456), 12 ]; 13 14 foreach ($values as $value) { 15 echo $value, PHP_EOL; 16 } 17 18 echo 'Addition', PHP_EOL; 19 20 $result = Operations::add(...$values); 21 echo '=> ', $result, PHP_EOL; 22 23 echo PHP_EOL; 24 25 echo 'Subtraction', PHP_EOL; 26 27 $result = Operations::subtract(...$values); 28 echo '=> ', $result, PHP_EOL; 29 30 echo PHP_EOL; 31 32 echo 'Multiplication', PHP_EOL; 33 34 $result = Operations::multiply(...$values); 35 echo '=> ', $result, PHP_EOL;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body