• Mention two useful shorcut functions available globally in cake php

      0 comments

    Following are 2 main shortcut functions available in cakephp

    // similar to print_r(), but dumps to the view and
    // is disabled if debug isn't > 0 in config.php
    pr($anything); 
    
    // returns the correctly internationalized plural or
    // singular depending on locale.
    __n($singular, $plural, $count, $return);
    

    If you are working with CakePHP and haven’t figure it out yet, it’s worth looking through basics.php in the API docs.

  • What are the two new error levels introduced in PHP5.3?

      0 comments

    E_DEPRECATED

    The E_DEPRECATED error level is used to indicate that a function or feature has been deprecated.

    E_USER_DEPRECATED

    The E_USER_DEPRECATED level is intended for indicating deprecated features in user code, similarly to the E_USER_ERROR and E_USER_WARNING levels.