3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Note extends CI_Controller { /*************************** Note CRUD ***************************/ // list records function notes_records() { $data = array(); if($query = $this->note_model->get_records()) { $data['records'] = $query; } $this->load->view('note', $data); } // note create function create() { if($_POST) { $data = array( 'title' => $this->input->post('title'), 'note' => $this->input->post('note') ); $this->note_model->add_record($data); redirect('site/members_area'); } else { $data['main_content'] = 'create_note'; $this->load->view('includes/template', $data); } } // edit form function edit() { if($query = $this->note_model->get_edit()) { $data['records'] = $query; } $data['main_content'] = 'note_edit'; $this->load->view('includes/template', $data); } // update data function update() { $data = array( 'title' => $this->input->post('title'), 'note' => $this->input->post('note') ); $this->note_model->update_record($data); redirect('site/members_area'); } // delete note function delete() { $this->note_model->delete_record(); redirect('site/members_area'); } /*************************** CATEGORY ***************************/ // create category function create_category() { $this->load->helper('form'); $this->load->library(array('form_validation')); // set validation rules $this->form_validation->set_rules('category_name', 'Name', 'required|max_length[200]|xss_clean'); if ($this->form_validation->run() == FALSE) { //if not valid $data['main_content'] = 'create_category'; $this->load->view('includes/template', $data); } else { //if valid $data = array( 'cat_title' => $this->input->post('category_name') ); $this->note_model->create_category($data); redirect('site/members_area'); } } // list notes by category`s function category_records() { if($query = $this->note_model->get_category()) { $data['records'] = $query; } if($query_note = $this->note_model->get_records()) { $data['notes_by_category'] = $query_note; } $data['main_content'] = 'category'; $this->load->view('includes/template', $data); } }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.40.0040.01118.84
8.3.30.0090.00918.67
8.3.20.0030.00518.78
8.3.10.0040.00420.90
8.3.00.0040.00421.77
8.2.170.0140.00722.96
8.2.160.0000.01420.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00321.07
8.2.110.0060.00320.51
8.2.100.0130.00017.91
8.2.90.0000.00719.22
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0050.00317.93
8.2.50.0030.00518.07
8.2.40.0040.00418.16
8.2.30.0000.00721.10
8.2.20.0000.00717.82
8.2.10.0090.00017.80
8.2.00.0030.00717.84
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0120.00923.85
8.1.230.0060.00622.80
8.1.220.0030.00518.77
8.1.210.0080.00018.90
8.1.200.0060.00317.25
8.1.190.0030.00517.41
8.1.180.0000.00918.10
8.1.170.0040.00418.61
8.1.160.0070.00018.77
8.1.150.0060.00318.58
8.1.140.0000.00817.40
8.1.130.0030.00317.81
8.1.120.0050.00317.47
8.1.110.0030.00717.44
8.1.100.0040.00417.46
8.1.90.0000.00717.48
8.1.80.0030.00617.37
8.1.70.0030.00317.35
8.1.60.0000.00917.56
8.1.50.0000.00817.36
8.1.40.0040.00417.55
8.1.30.0000.00717.61
8.1.20.0040.00417.63
8.1.10.0000.00917.55
8.1.00.0080.00017.49
8.0.300.0090.00020.02
8.0.290.0070.00017.15
8.0.280.0020.00518.41
8.0.270.0000.00817.24
8.0.260.0070.00016.93
8.0.250.0000.00717.11
8.0.240.0070.00417.11
8.0.230.0070.00017.09
8.0.220.0030.00317.04
8.0.210.0050.00317.02
8.0.200.0030.00316.93
8.0.190.0030.00317.04
8.0.180.0050.00317.06
8.0.170.0000.00717.02
8.0.160.0000.00916.90
8.0.150.0040.00416.98
8.0.140.0000.00716.86
8.0.130.0000.00813.54
8.0.120.0000.00717.02
8.0.110.0040.00416.88
8.0.100.0050.00216.84
8.0.90.0000.00717.04
8.0.80.0040.01116.95
8.0.70.0000.00817.11
8.0.60.0040.00417.07
8.0.50.0000.00716.84
8.0.30.0130.00717.32
8.0.20.0120.00517.40
8.0.10.0040.00417.05
8.0.00.0100.00816.72
7.4.330.0000.00516.74
7.4.320.0000.00616.51
7.4.300.0030.00316.48
7.4.290.0070.00016.46
7.4.280.0110.00016.49
7.4.270.0030.00316.61
7.4.260.0030.00313.32
7.4.250.0070.00016.48
7.4.240.0000.00716.47
7.4.230.0070.00016.30
7.4.220.0060.01216.46
7.4.210.0090.00716.49
7.4.200.0070.00016.54
7.4.190.0000.00716.59
7.4.160.0120.00616.48
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0130.00616.45
7.4.120.0070.01016.53
7.4.110.0130.00316.56
7.4.100.0060.01316.58
7.4.90.0110.00716.32
7.4.80.0030.01419.39
7.4.70.0130.00316.38
7.4.60.0110.00716.48
7.4.50.0000.00916.40
7.4.40.0070.00722.77
7.4.30.0140.00316.35
7.4.00.0080.01114.96
7.3.330.0000.00513.18
7.3.320.0140.00013.16
7.3.310.0050.00216.38
7.3.300.0000.00816.21
7.3.290.0170.00316.32
7.3.280.0100.00716.38
7.3.270.0060.01017.40
7.3.260.0090.00818.24
7.3.250.0120.00816.50
7.3.240.0100.00716.38
7.3.230.0130.00316.71
7.3.210.0090.00916.48
7.3.200.0150.00719.39
7.3.190.0090.00916.44
7.3.180.0110.00516.57
7.3.170.0040.01216.43
7.3.160.0030.01216.66
7.3.120.0070.01014.95
7.3.110.0110.00714.96
7.3.100.0080.00814.86
7.3.90.0000.01015.13
7.3.80.0080.00614.65
7.3.70.0070.01315.00
7.3.60.0000.01014.89
7.3.50.0060.00814.61
7.3.40.0060.00614.57
7.3.30.0000.01414.60
7.3.20.0070.00716.42
7.3.10.0070.01016.86
7.3.00.0040.00416.34
7.2.330.0060.01116.50
7.2.320.0130.00616.64
7.2.310.0140.01016.66
7.2.300.0090.00816.79
7.2.290.0030.01316.70
7.2.250.0040.01214.68
7.2.240.0120.00614.82
7.2.230.0100.00715.08
7.2.220.0120.00314.89
7.2.210.0070.00715.14
7.2.200.0000.01514.91
7.2.190.0040.01114.88
7.2.180.0090.00315.03
7.2.170.0140.00315.08
7.2.60.0030.01016.79
7.2.00.0070.01019.29
7.1.330.0030.01015.43
7.1.320.0070.00315.73
7.1.310.0060.01215.63
7.1.300.0110.00015.67
7.1.290.0080.00415.44
7.1.280.0000.01115.48
7.1.270.0030.01415.48
7.1.260.0030.00615.49
7.1.200.0080.00015.32
7.1.100.0000.01118.04
7.1.70.0000.00917.01
7.1.60.0080.00319.40
7.1.50.0100.01316.80
7.1.00.0000.05022.43
7.0.200.0070.00316.35
7.0.140.0030.07722.07
7.0.70.0030.07721.61
7.0.60.0000.09021.74
7.0.50.0070.07722.00
7.0.40.0000.08020.13
7.0.30.0070.08320.12
7.0.20.0100.07720.04
7.0.10.0030.08020.09
7.0.00.0030.08019.98
5.6.280.0070.07021.10
5.6.220.0070.07320.63
5.6.210.0000.07320.43
5.6.200.0100.08021.05
5.6.190.0130.07321.03
5.6.180.0030.08021.04
5.6.170.0070.06321.07
5.6.160.0070.08020.96
5.6.150.0070.05321.09
5.6.140.0070.08321.09
5.6.130.0030.08321.09
5.6.120.0130.07321.04
5.6.110.0100.05021.11
5.6.100.0070.05721.07
5.6.90.0070.08021.00
5.6.80.0070.08320.41
5.6.70.0070.07720.34
5.6.60.0100.05720.50
5.6.50.0100.04720.56
5.6.40.0070.07720.39
5.6.30.0030.07320.33
5.6.20.0070.07020.44
5.6.10.0030.08020.38
5.6.00.0070.07720.47
5.5.360.0000.08020.30
5.5.350.0070.08020.41
5.5.340.0070.07720.94
5.5.330.0000.06320.84
5.5.320.0030.08720.91
5.5.310.0030.08020.91
5.5.300.0030.05720.84
5.5.290.0030.07720.86
5.5.280.0070.08720.91
5.5.270.0070.07320.88
5.5.260.0000.08720.73
5.5.250.0070.07320.70
5.5.240.0030.07720.26
5.5.230.0070.08020.30
5.5.220.0100.07020.27
5.5.210.0030.08020.22
5.5.200.0000.07720.20
5.5.190.0030.07020.29
5.5.180.0000.08720.19
5.5.160.0100.06720.27
5.5.150.0030.08020.23
5.5.140.0100.04720.10
5.5.130.0070.07320.19
5.5.120.0030.07320.19
5.5.110.0030.07320.09
5.5.100.0000.08020.11
5.5.90.0030.06720.02
5.5.80.0030.08020.05
5.5.70.0070.08020.09
5.5.60.0100.08020.10
5.5.50.0000.06320.14
5.5.40.0100.06720.09
5.5.30.0000.05320.13
5.5.20.0030.08020.05
5.5.10.0000.08020.14
5.5.00.0130.07320.04
5.4.450.0000.06319.22
5.4.440.0030.06019.34
5.4.430.0070.08019.52
5.4.420.0030.07319.19
5.4.410.0100.07019.05
5.4.400.0100.06019.27
5.4.390.0030.07019.14
5.4.380.0030.06318.86
5.4.370.0000.07719.21
5.4.360.0030.08019.17
5.4.350.0030.08019.12
5.4.340.0030.07719.20
5.4.320.0030.07019.15
5.4.310.0030.05019.03
5.4.300.0070.06019.19
5.4.290.0100.06719.03
5.4.280.0070.07019.05
5.4.270.0100.07319.13
5.4.260.0100.04719.08
5.4.250.0100.06719.20
5.4.240.0070.07019.07
5.4.230.0100.07019.04
5.4.220.0100.06319.01
5.4.210.0070.07318.85
5.4.200.0070.07318.90
5.4.190.0100.05719.11
5.4.180.0030.07018.85
5.4.170.0000.06019.07
5.4.160.0030.07319.04
5.4.150.0030.07719.12
5.4.140.0000.07316.38
5.4.130.0030.07316.38
5.4.120.0130.05716.36
5.4.110.0000.08016.42
5.4.100.0070.05016.32
5.4.90.0000.07316.37
5.4.80.0100.05316.46
5.4.70.0070.06316.45
5.4.60.0000.04316.35
5.4.50.0070.03316.36
5.4.40.0100.05016.36
5.4.30.0000.04716.31
5.4.20.0030.06716.32
5.4.10.0000.04016.38
5.4.00.0070.06315.83
5.3.290.0030.07314.80
5.3.280.0130.06014.71
5.3.270.0000.08014.77
5.3.260.0000.07714.66
5.3.250.0030.06714.71
5.3.240.0030.07014.61
5.3.230.0070.06014.55
5.3.220.0070.06014.56
5.3.210.0070.07014.65
5.3.200.0030.07314.73
5.3.190.0030.07314.52
5.3.180.0070.07014.65
5.3.170.0030.08014.54
5.3.160.0070.03314.51
5.3.150.0000.07714.56
5.3.140.0000.04014.64
5.3.130.0100.07314.54
5.3.120.0070.05714.69
5.3.110.0000.05014.50
5.3.100.0030.06714.18
5.3.90.0000.05014.02
5.3.80.0000.04014.14
5.3.70.0030.06713.93
5.3.60.0000.07314.03
5.3.50.0030.05713.97
5.3.40.0030.07313.89
5.3.30.0030.06313.99
5.3.20.0000.03313.85
5.3.10.0000.03313.56
5.3.00.0030.03313.72
5.2.170.0000.05711.18
5.2.160.0000.04711.07
5.2.150.0030.05311.20
5.2.140.0030.05011.17
5.2.130.0000.03011.11
5.2.120.0000.03011.18
5.2.110.0070.04311.21
5.2.100.0000.04011.13
5.2.90.0000.03011.16
5.2.80.0000.03011.06
5.2.70.0000.03011.10
5.2.60.0030.03311.13
5.2.50.0000.03011.06
5.2.40.0000.04011.06
5.2.30.0070.02711.06
5.2.20.0100.05711.06
5.2.10.0030.06011.06
5.2.00.0000.06311.06
5.1.60.0100.04711.06
5.1.50.0030.05011.06
5.1.40.0000.04311.06
5.1.30.0070.05011.06
5.1.20.0000.05011.06
5.1.10.0200.04011.06
5.1.00.0070.05011.06
5.0.50.0000.04311.06
5.0.40.0000.03711.06
5.0.30.0030.06011.06
5.0.20.0030.04311.06
5.0.10.0070.03011.06
5.0.00.0100.05311.06
4.4.90.0000.02311.06
4.4.80.0070.02011.06
4.4.70.0000.03711.06
4.4.60.0070.02711.06
4.4.50.0000.02711.06
4.4.40.0030.05011.06
4.4.30.0000.03711.06
4.4.20.0030.02311.06
4.4.10.0000.03711.06
4.4.00.0000.05011.06
4.3.110.0000.02311.06
4.3.100.0000.03711.06
4.3.90.0030.03311.06
4.3.80.0000.04711.06
4.3.70.0030.03311.06
4.3.60.0000.03711.06
4.3.50.0000.03711.06
4.3.40.0000.04711.06
4.3.30.0070.03011.06
4.3.20.0000.03711.06
4.3.10.0130.02311.06
4.3.00.0030.03311.06

preferences:
41.01 ms | 400 KiB | 5 Q