Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg

PHP : Appendices : Migrating from PHP/FI 2 to PHP 3 : old_function


The old_function statement allows you to declare a function using a syntax identical to PHP/FI2 (except you must replace 'function' with 'old_function'.

This is a deprecated feature, and should only be used by the PHP/FI2->PHP 3 convertor.


Functions declared as old_function cannot be called from PHP's internal code. Among other things, this means you can't use them in functions such as usort(), array_walk(), and register_shutdown_function(). You can get around this limitation by writing a wrapper function (in normal PHP 3 form) to call the old_function.

Code Examples / Notes » migration.old_php

dzonny dot dz

For everybody who want to know old_function's syntax, here it is:
old_function name $param1, $param2, ..., $paramn ( code;);
old_function eq $param, $param(
       echo "equal";
       echo "not equal";
   return ($param1==$param2);

Change Language

Follow Navioo On Twitter
About the incompatibilities in 3.0
Start/end tags
if..endif syntax
while syntax
Expression types
Error messages have changed
Short-circuited boolean evaluation
Function TRUE/FALSE return values
Other incompatibilities
eXTReMe Tracker