Results 1 to 9 of 9

Thread: PHP 4: static

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Resolved PHP 4: static

    I don't know if PHP 4 supports static but I need help on achieving this or workaround on having something like
    Code:
    <?php
    class test {
      static $a;
      
      function b() {
        if (!isset(test::$a)) {
          test::$a = "hello world";
        }
        return test::$a;
      }
    }
    
    echo test::b();
    Thanks.
    Last edited by nebulom; May 22nd, 2007 at 09:20 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width