Related Content
Approximating Pi Using A Circle And A Square
Pi day was a few weeks ago, but I came across this simple approximation of pi recently and decided to put together an example in PHP since it seemed pretty simple.
This approximation of pi centers around a real world example, but we can simulate this using some code.
Drawing A Parabolic Curve With Straight Lines In PHP
A parabolic curve is a type of curve where every point is an equal distance from a focal point. There a number of different way to generate this sort of curve using math, but one of the simplest is to use straight lines to create the illusion of the curve.
Recreating Spotify Wrapped In PHP
I quite like the end of the year report from Spotify that they call "Wrapped". This is a little application in which they tell you what your favorite artist was and what sort of genres you listened to the most during the year.
Should A Constructor Throw An Exception?
Let's say you had a class that you wanted to use, but there was some sort of error in creating the object. This might be that the wrong parameters were passed, or the third party service (eg. a database) wasn't available at the time of creation.
PHP Question: Variable Reference
Question
What does the following code print out?
function arrayPrint($array)
{
echo implode(' ', $array);
}
$arrayA = [1, 2, 3];
$arrayB = $arrayA;
$arrayB[1] = 0;
arrayPrint($arrayA);
Creating An Authentication System With PHP and MariaDB
Using frameworks to handle the authentication of your PHP application is perfectly fine to do, and normally encouraged. They abstract away all of the complexity of managing users and sessions that need to work in order to allow your application to function.
Comments
Submitted by April on Tue, 06/23/2009 - 23:25
PermalinkSubmitted by BitLYDevGuy on Sun, 06/28/2009 - 00:43
PermalinkSubmitted by philipnorton42 on Mon, 06/29/2009 - 08:06
PermalinkSubmitted by goodone on Wed, 07/08/2009 - 12:30
PermalinkSubmitted by Adam on Tue, 12/01/2009 - 16:17
PermalinkSubmitted by opencode on Sun, 06/06/2010 - 16:38
PermalinkThe blog post is here:
http://www.hashbangcode.com/blog/quickest-way-download-web-page-php-197.html
What I might do is add some functionality that uses an alternate route if the file_get_contents() function isn't available.
Submitted by philipnorton42 on Mon, 06/07/2010 - 12:54
PermalinkSubmitted by Mal Curtis on Mon, 07/19/2010 - 13:04
PermalinkSubmitted by philipnorton42 on Mon, 07/19/2010 - 16:50
PermalinkSubmitted by Davie Carr on Sun, 11/14/2010 - 16:32
PermalinkSubmitted by Anonymous on Thu, 01/20/2011 - 14:35
PermalinkSubmitted by philipnorton42 on Thu, 01/20/2011 - 14:43
PermalinkHi,
is this class still work on v3 API from bit.ly?
Submitted by Hamdi on Mon, 06/27/2011 - 18:25
PermalinkNot that I know of. At least I haven't heard of any problems. You could always give it a try and see if it works :)
Submitted by philipnorton42 on Mon, 06/27/2011 - 19:32
PermalinkAdd new comment