


Is there any key in php that can be used with an array without using isset check?
Aug 08, 2016 am 09:06 AM
I have used a framework before, called speedPHP
, which is rarely used by people. When using it, any key values of these arrays such as session
, get
, post
are not used isset
, see I looked at its source code and didn’t see where it was set up. Recently, I thought this framework was slow, so I wrote a framework myself. I always have to isset
when writing, especially when submitting a form. It can be written very quickly. Yes, I ended up writing for a long, long time, all while writing isset
. So I want to ask if there is a way without writing isset
? Also keep error reporting.
Some people may say that this approach will screw me up in the end, but I have used that framework for more than a year, and I have never been screwed by the "no isset
" thing...
I woke up this morning and thought about it. I thought it had some kind of fault-tolerance settings. This morning I thought, maybe it was just the debug type that had been changed. Then I looked at its debug settings, and sure enough...
<code>if( substr(PHP_VERSION, 0, 3) == "5.3" ){ error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED); }else{ error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); } </code>
speedPHP is written like this. After I copied these, sure enough, no errors were reported. It’s not that there were no errors, but no errors were reported.
Reply content:
I have used a framework before, called speedPHP
, which is rarely used by people. When using it, any key values of these arrays such as session
, get
, post
are not used isset
, see I looked at its source code and didn’t see where it was set up. Recently, I thought this framework was slow, so I wrote a framework myself. I always have to isset
when writing, especially when submitting a form. It can be written very quickly. Yes, I ended up writing for a long, long time, all while writing isset
. So I want to ask if there is a way without writing isset
? Also keep error reporting.
Some people may say that this approach will screw me up in the end, but I have used that framework for more than a year, and I have never been screwed by the "no isset
" thing...
I woke up this morning and thought about it. I thought it had some kind of fault-tolerance settings. This morning I thought, maybe it was just the debug type that had been changed. Then I looked at its debug settings, and sure enough...
<code>if( substr(PHP_VERSION, 0, 3) == "5.3" ){ error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED); }else{ error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); } </code>
speedPHP is written like this. After I copied these, sure enough, no errors were reported. It’s not that there were no errors, but no errors were reported.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

How To Set Up Visual Studio Code (VS Code) for PHP Development
