PHP vs Perl

Here's a simple program which calculates, to eight decimal places, the value of the Golden Ratio φ implemented in both PHP and Perl, to demonstrate their similarities. Perl #!/usr/bin/perl $a = 1; $b = 1; $c = undef; $psi_old = undef; print “Approximating psi…\n”; while (1) { $psi = sprintf(‘%.08f’, $b/$a); last if ($psi_old eq … Continued