Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4051458
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:11:50+00:00 2026-05-20T14:11:50+00:00

Idea taken from here – this time you can only use PHP. Is this

  • 0

Idea taken from here – this time you can only use PHP.
Is this even possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:11:51+00:00Added an answer on May 20, 2026 at 2:11 pm

    Here’s an interesting oo solution based on PHP’s overloading:

    class thousand_printer {
       public function __construct() {
          $this->print1();
       }
    
       public function __call($method, $_) {
          $count = str_replace('print', '', $method);
          echo "$count ";
          $this->{"print" . ++$count}();
       }
    
       public function print1000() {
          echo "1000\n";
       }
    }
    
    new thousand_printer;
    

    I’m glad my solution is so popular. Here’s a slight improvement that offers some modularity:

    class printer {
       public function __construct() {
          $this->print1();
       }
       public function __call($method, $_) {
          $count = str_replace('print', '', $method);
          echo "$count ";
          $this->{"print" . ++$count}();
       }
    }
    
    class thousand_printer extends printer {
       public function print1001() {}
    }
    
    new thousand_printer;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have no idea why this isn't working. I've taken code from a previous
My idea is to implement something like this: https://i.stack.imgur.com/8BmW5.png screenshot is from here: http://www.thedrum.co.uk/opinion/2012/03/08/five-ways-new-facebook-timeline-will-impact-brands
This is a XAML code sample taken from the MSDN library article for the
here's a portion of my code (taken from google charts example here http://code.google.com/apis/chart/image/docs/post_requests.html )
I am trying to form an acronym from a given text. The Idea here
This is probably crazy. I want to take the idea of Dependency Injection to
Idea: I want to make smth like real time electronic blackboard. Many users have
Any idea on how can I track users bookmarking event? I want to find
The idea here is to uninstall a program silently. Unfortunately the program's msi is
In IDEA 11, what is the difference between Import project from external model and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.