3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Begin polyfills. function get_option(){} function add_option(){} function update_option(){} // Begin Kristine's code sample. $options = get_option (foo_cache_plugin); if ( !$options) { //add option if option doesn't exist yet add_option (foo_cache_plugin, array ( 'foo_should_cache' => 'true', 'foo_should_display_notice' => 'false', 'foo_should_cache_logged_in_users' => 'false' )); } else { //update option if it exists $options [foo_should_cache] = 'true'; $options [foo_should_display_notice] = 'false'; $options [foo_should_cache_logged_in_users] = 'false'; update_option (foo_cache_plugin, $options); } };
Output for 5.4.1 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.14
Parse error: syntax error, unexpected '}' in /in/BSvop on line 24
Process exited with code 255.

preferences:
174.71 ms | 1395 KiB | 65 Q