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

  • Home
  • SEARCH
  • 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 925089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:27:57+00:00 2026-05-15T19:27:57+00:00

i used to have a function defined like this (that is working fine under

  • 0

i used to have a function defined like this (that is working fine under ubuntu 9.10):

public function __toString( $surNameFirst = false) { 
     if ($this->givenName . $this->surname == '') return null;
     else .......
}

after i have updated my machine to ubuntu 10.04( and php version Version: 5.3.2-1ubuntu4.2
) my app starts to show an error like this one ==>

Fatal error: Method Application_Model_Person::__tostring() cannot take arguments in /home/speshu/Development/where/application/models/Person.php on line 39

Call Stack:
    0.0001     616576   1. {main}() /home/speshu/Development/where/public/index.php:0  
    0.0294    1008248   2. Zend_Application->bootstrap() /home/speshu/Development/where/public/index.php:35
    0.0294    1008328   3. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() /usr/local/lib/ZendFramework-1.10.0/library/Zend/Application.php:355
    0.0294    1008328   4. Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() /usr/local/lib/ZendFramework-1.10.0/library/Zend/Application/Bootstrap/BootstrapAbstract.php:582
    0.0387    1991416   5. Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() /usr/local/lib/ZendFramework-1.10.0/library/Zend/Application/Bootstrap/BootstrapAbstract.php:618
    0.0387    1991776   6. Bootstrap->_initDoctrineCLI() /usr/local/lib/ZendFramework-1.10.0/library/Zend/Application/Bootstrap/BootstrapAbstract.php:665
    0.0387    1991856   7. Bootstrap->_initDoctrine() /home/speshu/Development/where/application/Bootstrap.php:66
    0.0406    2245200   8. Doctrine_Core::loadModels() /home/speshu/Development/where/application/Bootstrap.php:93
  • 1 1 Answer
  • 1 View
  • 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-15T19:27:58+00:00Added an answer on May 15, 2026 at 7:27 pm

    As of version 5.3 The __toString magic method can no longer accept arguments.

    In any case should you really be doing that with a magic method? Why not declare toString($whatever) instead?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used Javascript onlaod like this: function check() { var pic = new
I want to have a macro dbtest that can be used like this: (dbtest
I have a function that I have used a bunch of times in various
I have used this function to convert string to bits. def a2bits(chars): return bin(reduce(lambda
I have a function that is used to creating a directory. It uses CreateDirectoryA()
I have a function in java script, that I used it to take the
I want to have a function defined in a superclass that returns an instance
I have a web app that I'm working on that I would like the
In C++ I have defined a class that has this as a member: static
In my project, I have an enum defined in a class, that is used

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.