3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /** * Controller used to manage specificites * * Generated using AdminGen, Copyright Conception Focus 2012 * @author korri */ class Specificites extends CI_Controller { public function __construct() { parent::__construct(); requireRight('gestion_' . 'specificites'); } /** * List all specificites * @return null */ public function index() { $specificites = new Specificite(); $data['specificites'] = $specificites->get_iterated(); $this->smartyparser->parse('specificites/listing.tpl', $data); } /** * Internal, used by add and edit to render edition form * * @param Specificite|boolean $specificite Currently edited specificite * * @return null */ public function _edit($specificite = false) { if (!$specificite) { $specificite = new Specificite(); } $data['specificite'] = $specificite; $this->smartyparser->parse('specificites/edit.tpl', $data); } /** * Edit an existing specificite * * @param int $id Id of the edited specificite * * @return null */ public function edit($id) { $specificite = new Specificite($id); if (!$specificite->exists()) { show_404(); } $this->_edit($specificite); } /** * Add a specificite * @return null */ public function add() { $this->_edit(); } /** * Post page, used to receive data from the form */ public function post() { if (!$this->input->post()) { show_404(); } if ($this->input->post('id')) { $specificite = new Specificite((int)$this->input->post('id')); if (!$specificite->exists()) { show_404(); } } else { $specificite = new Specificite(); } $post = $this->input->post(); $specificite->from_array($post); if ($specificite->save()) { $this->session->set_flashdata('success', 'Le/La specificite à bien été enregistré(e).'); redirect('specificites'); } $this->_edit($specificite); } public function delete($id) { $specificite = new Specificite($id); if (!$specificite->exists()) { show_404(); } else { $specificite->delete(); $this->session->set_flashdata('success', 'Le/La specificite à bien été supprimé'); } redirect('specificites'); } }
based on CInH7
Output for 5.0.0 - 5.2.17, 7.0.0 - 7.1.0
Fatal error: Class 'CI_Controller' not found in /in/Of7XB on line 9
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Class 'CI_Controller' not found in /in/Of7XB on line 10
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Of7XB on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Of7XB on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/Of7XB on line 12
Process exited with code 255.