3v4l.org

run code in 300+ PHP versions simultaneously
<?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'); } }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Class "CI_Controller" not found in /in/Of7XB:9 Stack trace: #0 {main} thrown in /in/Of7XB on line 9
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'CI_Controller' not found in /in/Of7XB:9 Stack trace: #0 {main} thrown in /in/Of7XB on line 9
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33
Fatal error: Class 'CI_Controller' not found in /in/Of7XB on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 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.3.11, 4.4.0 - 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.

preferences:
224.04 ms | 401 KiB | 312 Q