Voting

: min(eight, eight)?
(Example: nine)

The Note You're Voting On

EVODelavega
11 years ago
Just thought I'd react to simast at gmail dot com's note: While he has a point in saying C outperforms PHP, his suggestion is micro-optimization. I'm not 100% against micro-optimizing code, but if you do, go all the way:

<?php

// Your custom class dir
define('CLASS_DIR', 'class/')

// Add your class dir to include path
set_include_path(get_include_path().PATH_SEPARATOR.CLASS_DIR);

This adds the include path to THE END of the paths PHP will scan for the class file, resulting in a bunch of misses (file-not-found's) before actually looking into the CLASS_DIR.
A more sensible approach, then would be to write

set_include_path(
CLASS_DIR.
PATH_SEPARATOR,
get_include_path()
);

<< Back to user notes page

To Top