Req #66518 [Opn->Wfx]: need some exceptions for php's include or require

From: Date: Wed, 22 Sep 2021 16:34:47 +0000
Subject: Req #66518 [Opn->Wfx]: need some exceptions for php's include or require
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236757@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66518&edit=1 ID: 66518 Updated by: cmb@php.net Reported by: wolftankk at gmail dot com Summary: need some exceptions for php's include or require -Status: Open +Status: Wont fix Type: Feature/Change Request Package: *General Issues Operating System: Linux PHP Version: 5.5.8 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This is unlikely to happen; at least not without an RFC[1]. Feel free to pursue the RFC process! :) [1] <https://wiki.php.net/rfc/howto> Previous Comments: ------------------------------------------------------------------------ [2014-01-20 09:24:54] wolftankk at gmail dot com Description: ------------ Hi, We use include or require method for including a script file, it needs some exceptions. EX. 1. This file is not exists. (also I can use file_exists for checking it) 2. This script file syntax errors, if it use @include a file, it will shutdown.(for file cache) Test script: --------------- try { $data = include('test.cache.php'); } catch (Exception $e) { print($e->getMessage()); //throw file dont exists or syntax errors } finally { $data = false; } if (!$data) { //do something } else { } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66518&edit=1

« previous php.bugs (#236757) next »