Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Kohana Online Test

Topics Covered

  • Queries
  • Database
  • Referencing
  • Tables
  • Operators
  • Database Objects
  • Forms
  • Controller Testing
  • Regular Expressions

Useful for hiring

  • Kohana Developer
  • Senior Software Web Developer

Start hiring job-fit candidates using this assessment

GET A DEMO

"Our recruitment team loves Interview Mocha especially for their skill assessments, simulators, and friendly support. Since using Interview Mocha, we interview only relevant candidates, and this has reduced our time to hire. Recruitment is no longer an hassle for us."

Christoph, e-Zest GmbH
Question

Which of the following code snippet can be used to POST json strings (created using jsin_encode) with Kohana in PHP?

Note: There can be multiple correct answers to this question.

Answer
    • $request = Request::factory('http://sample.com/put_api') -> method(Request::PUT) -> body(json_encode('the body')) -> headers('Content-Type', 'application/json');

    • $request = Request::factory('http://sample.com/post_api') -> method(Request::POST) -> body(json_encode('the body')) -> headers('Content-Type', 'application/json');

    • $request = Request::factory('http://sample.com/post_api') -> body(json_encode('the body')) -> headers('Content-Type', 'application/json');

Question

Given below is an example of query builder in Kohana. 
$query = DB::select() -> from('codes') -> where('name', '=', 'PHP') -> execute($mydb);

Which of the following code snippet is equivalent to the given query?

Answer
    • $query = DB::query(Database::SELECT, 'SELECT * FROM codes WHERE name = :name');
      $query -> addParam(':name', 'PHP');

    • $query = DB::query(Database::SELECT, 'SELECT * FROM codes WHERE name = :name');
      $query -> param( name = 'PHP');

    • $query = DB::query(Database::SELECT, 'SELECT FROM codes WHERE name = @’ );
      $query -> param(':name', 'PHP');

    • $query = DB::query(Database::SELECT, 'SELECT * FROM codes WHERE name = :name');
      $query -> param(':name', 'PHP');

Question

Given below is an example of call-time reference.
call_user_func('Formo_'.$name.'::load', & $this);

On executing the above command, you get an error of depreciation. Which of the following is the correct version of the above command in Kohana?

Answer
    • call_user_func('Formo_'.$name.'::load', $this);

    • call_user_func('Formo_'.$name.'::load', && $this);

    • call_user_func('Formo_'.$name.'::load', &this);

    • None of the mentioned

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO