About the Author

author photo

Adam Trachtenberg is the Senior Manager of Platform Evangelism at eBay, where he preaches the gospel of the eBay platform to developers and businessmen around the globe. Before eBay, Adam co-founded and served as vice president for development at two companies, Student.Com and TVGrid.Com. At both firms, he led the front- and middle-end web site design and development. Adam began using PHP in 1997, and is the author of Upgrading to PHP 5 and coauthor of PHP Cookbook, both published by O'Reilly Media. He lives in San Francisco, California, and has a B.A. and M.B.A. from Columbia University.

See All Posts by This Author

Did you know about PHP’s old_function?

I was reviewing Upgrading to PHP 5 today and I came across this lovely section in Appendix B, which I had completely forgotten about:

PHP/FI had a quirky function declaration syntax:

function sum $a, $b (
    return($a + $b);
);

This was changed in PHP 3, but you could continue to use the old form in PHP 3 and PHP 4 if you declared your function as an old_function:

old_function sum $a, $b (
    return($a + $b);
);

Alas, after six years, this backward compatibility feature is now gone. Another nostalgic remnant of PHP/FI has passed away.

I must say, I used PHP/FI, but I never resorted to the old_function hack to ease my PHP 3 migration issues.

Did anybody ever use this?

There Are 2 Responses So Far. »

  1. I never knew about that. Thanks for the history lesson. :-)

  2. They should bring it back:

    Totally_Retro_Dude sum $a, $b (
    return($a + $b);
    );

Post a Response