PluginSift
PluginsThemesCompare
Directory
  • Plugins
  • Themes
  • Compare Plugins
Plugin Comparisons
  • SEO
  • Security
  • Ecommerce
  • Page Builders
  • Caching
  • Backup
  • Forms
  • Analytics
Resources
  • About
  • Contact
  • llms.txt

© 2026 PluginSift. Data sourced from WordPress.org. · [email protected]

  1. Home
  2. Plugins
  3. Error
  4. Safe Function Call
Safe Function Call icon

Safe Function Call

Safely and easily call functions that may not be available (such as those provided by a plugin that gets deactivated)

By Scott Reilly·Error·Free
5(1 reviews)
·10 active installs·Updated 11 months ago
DownloadVisit HomepageCompare

As of April 2026, Safe Function Call is a WordPress error plugin with 10 active installations and a 5/5 rating from 1 reviews. It has been downloaded 4.8K+ times in total. Requires WordPress 1.5+ and PHP false+. Available on WordPress.org since 2009. Top alternative: WP Maximum Execution Time Exceeded.

5/51 reviews
10active installs
4.8K+total downloads
17 yearssince 2009

Overview

Safely call a function, class method, or object method in a manner that doesn’t generate errors if those plugins cease to exist.

Various helper functions are provided that provide handy variations of this theme:

  • _sfc(): Safely call a function and get its return value
  • _sfce(): Safely call a function and echo its return value
  • _sfcf(): Safely call a function; if it doesn’t exist, then a fallback function (if specified) is called
  • _sfcm(): Safely call a function; if it doesn’t exist, then echo a message (if provided)

Let’s assume you had something like this in a template:

<?php list_cities( 'Texas', 3 ); ?>

If you deactivated the plugin that provided list_cities(), your site would generate an error when that template is accessed.

You can instead use _sfc(), whi…

Read full description on WordPress.org

Ratings & Reviews

51 reviews
5 ★
1
4 ★
0
3 ★
0
2 ★
0
1 ★
0

Compatibility

WordPress1.5+ requiredTested up to 6.8.5
PHPfalse+ required

Top Alternatives to Safe Function Call

WP Maximum Execution Time Exceeded icon
WP Maximum Execution Time Exceeded
4.820K+ installsUpdated 5 years ago
ViewCompare
WPS Bidouille icon
WPS Bidouille
4.910K+ installsUpdated 2 months ago
ViewCompare
Link Juice Keeper icon
Link Juice Keeper
4.710K+ installsUpdated 9 months ago
ViewCompare
Fatal Error Notify icon
Fatal Error Notify
4.86.0K+ installsUpdated 1 month ago
ViewCompare
Enable CORS icon
Enable CORS
3.76.0K+ installsUpdated 1 month ago
ViewCompare
View all error plugins →

Frequently Asked Questions

Changelog

1.4 (2025-04-09)

Highlights:

This minor release sanitizes the output of the callback return value in _sfce() and the $msg_if_missing argument value to _sfce(), notes compatibility through WP 6.8+ and PHP 8.3+, and updates copyright date (2025).

Details:

  • Hardening: Sanitize output of callback return value in _sfce()
  • Hardening: Sanitize output of $msg_if_missing argument value to _sfcm()
  • Change: Note compatibility through WP 6.8+
  • Change: Note compatibility through PHP 8.3+
  • Change: Update copyright date (2025)
View full changelog on WordPress.org

Contributors

Scott ReillyScott Reilly
Plugin Info
Version
1.4
Last Updated
Apr 14, 2025
WP Requires
1.5+
Tested Up To
6.8.5
PHP Requires
false+
Active Installs
10
Downloads
4.8K+
Added
Jun 11, 2009
Business
Free

Tags

errorfunctiontemplatecoffee2code

Developer

S
Scott Reilly
63 plugins0.1M+ total installs
View all plugins →

Quick Compare

Safe Function Call vs WP Maximum Execution Time Exceeded→Safe Function Call vs WPS Bidouille→Safe Function Call vs Link Juice Keeper→

Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.