protected function shouldBlockPhpUpload($value, $parameters)
    {
        if (in_array('php', $parameters)) {
            return false;
        }

        $phpExtensions = [
            'php', 'php3', 'php4', 'php5', 'phtml',
        ];

        return ($value instanceof UploadedFile)
           ? in_array(trim(strtolower($value->getClientOriginalExtension())), $phpExtensions)
           : in_array(trim(strtolower($value->getExtension())), $phpExtensions);
    }
protected function shouldBlockPhpUpload($value, $parameters)
    {
        if (in_array('php', $parameters)) {
            return false;
        }

        $phpExtensions = [
            'php', 'php3', 'php4', 'php5', 'phtml',
        ];

        return ($value instanceof UploadedFile)
           ? in_array(trim(strtolower($value->getClientOriginalExtension())), $phpExtensions)
           : in_array(trim(strtolower($value->getExtension())), $phpExtensions);
    }
protected function shouldBlockPhpUpload ( $ value , $ parameters ) { if ( in_array ( 'php' , $ parameters ) ) { return false ; } $ phpExtensions = [ 'php' , 'php3' , 'php4' , 'php5' , 'phtml' , ] ; return ( $ value instanceof UploadedFile ) ? in_array ( trim ( strtolower ( $ value -> getClientOriginalExtension ( ) ) ) , $ phpExtensions ) : in_array ( trim ( strtolower ( $ value -> getExtension ( ) ) ) , $ phpExtensions ) ; }
Check if PHP uploads are explicitly allowed.

@param  mixed  $value
@param  array  $parameters
@return bool
Check if PHP uploads are explicitly allowed .