• 11

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 187


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 187
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Is this just a stylistic difference, or does using require_once('filename.php') vs require_once 'filename.php' have actual load/efficiency differences?

include, include_once, require and require_once are not functions, they are statements, that is why you should not use ().

Also, consider this from php.net:


// won't work
if (include('vars.php') == TRUE) {
    echo 'OK';

// works
if ((include 'vars.php') == TRUE) {
    echo 'OK';

  • 1
Reply Report