View RSS Feed

John

  1. Illogical PHP Logic

    by on 07-17-2009 at 05:53 PM
    In algebra, after we learn the basic distributive, commutative, and associative properties, the transitive property of equality is usually next in the curriculum. For those of you who do not recall the terminology, the transitive property of equality says if $a == $b and $b == $n then $a == $n. Using this age old logic, you can prove FALSE == TRUE and 0 == 1 in PHP. Here is how:

    Code:
    $a 0;
    $b "Hooray for PHP logic and dynamic type casting?";
    var_dump(((FALSE == 
    ...

    Updated 07-17-2009 at 10:37 PM by John

    Categories
    Uncategorized
  2. PHP6 - ifsetor() :?

    by on 02-16-2009 at 02:07 AM
    Web developers are constantly validating data, either through JavaScript or through a server side programming language such as PHP. If you have done any PHP development, I am sure you have been in the situation where, if a request variable is set, you want want to use that value, if it is not set, you would like it to default to a specific value. The most common and logical method to accomplish this is to use an if/else block.
    Code:
    if(isset($_GET['foo'])) {
        
    $bar $_GET['foo']; 
    ...
    Tags: php6 Add / Edit Tags
    Categories
    Uncategorized
  3. 1-2-3-4-5-6-7-8-9-0

    by on 02-13-2009 at 09:13 PM
    Today, February 13, 2009 at 6:31 EST, the Unix time reached 1234567890. That is, 1,234,567,890 seconds since the Unix epoch (January 1, 1970).
    Categories
    Uncategorized
  4. D Link DNS 323 NAS

    by on 01-16-2009 at 11:00 PM
    A few days ago I purchased a D-Link DNS 323 and a 1TB Western Digital hard drive to go along with it. I must say, I am thoroughly impressed. The initial setup took five minutes. I simply took off the front cover of the NAS, inserted the drive (no cables), plugged in the RJ-45 and power cables, and it was all set.


    The purpose of a NAS is to provide network storage. The D-Link NAS 323 extends beyond this default requirement and offers an abundance of applications such as a built in FTP ...
    Categories
    Uncategorized
  5. Tidy up your HTML

    by on 12-17-2008 at 11:00 PM
    If you are a php programmer, you should be aware of the annoyances brought upon by html. I am not saying html is annoying, but when you combine php and html in the same document, it becomes a head ach.  Even if you separate your presentation logic from your business logic and data, your html source code will most likely look like crap. Sure you might spend a few minutes properly indenting your php source, but once that php executes and sends the response to the browser, at the very least, there ...
    Categories
    Uncategorized
Page 1 of 5
1 2 3 ... LastLast