3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Controller_Promise extends Controller_Template { public function init() { //Error: turns false after second page refresh if (\Auth::check()) { return Model_User::find_by_email(Auth::get_email()); } } } class Controller_Home extends Controller_Promise { public function action_index() { $this->template->user = parent::init(); } public function action_404() { return Response::forge(Presenter::forge('home/404'), 404); } } class Controller_Auth extends Controller_Promise { public function action_login() { if (Input::is_ajax()) { //Error: validates without any sort of CSRF enable if (Security::check_token(Input::post('__token'))) { //validate and login } } else { Response::redirect('404'); } } } /* <script> $(document).ready(function(e) { $('.form').on('submit', (function(e){ e.preventDefault(); var formData = new FormData(this); formData.append('__token', fuel_csrf_token()); $.ajax ({ url: $(this).data('uri'), data:formData, cache:false, processData:false, dataType:'json', contentType:false, type:'post', success: function(result) { .... } }); })); }); </script> */
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.14
Fatal error: Uncaught Error: Class "Controller_Template" not found in /in/LOOYn:2 Stack trace: #0 {main} thrown in /in/LOOYn on line 2
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'Controller_Template' not found in /in/LOOYn:2 Stack trace: #0 {main} thrown in /in/LOOYn on line 2
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33
Fatal error: Class 'Controller_Template' not found in /in/LOOYn on line 2
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Fatal error: Class 'Controller_Template' not found in /in/LOOYn on line 3
Process exited with code 255.

preferences:
174.65 ms | 409 KiB | 5 Q