3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function is_wptouch_user_agent() { // This needs to match your WP Touch list!! $useragents = array( "iphone", // Apple iPhone "ipod", // Apple iPod touch "aspen", // iPhone simulator "dream", // Pre 1.5 Android "android", // 1.5+ Android "cupcake", // 1.5+ Android "blackberry9500", // Storm "blackberry9530", // Storm "opera mini", // Experimental "webos", // Experimental "incognito", // Other iPhone browser "webmate" // Other iPhone browser ); $browser_agent = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16"; $is_wptouch_ua = false; foreach ( $useragents as $useragent ) { if ( preg_match( "#$useragent#i", $browser_agent ) ) { $is_wptouch_ua = true; break; } } return($is_wptouch_ua); } global $batcache; $batcache->unique['wptouch'] = is_wptouch_user_agent(); echo $batcache;
Output for 7.1.0
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/fG159 on line 34
Process exited with code 255.
Output for 5.2.0 - 7.0.14
Catchable fatal error: Object of class stdClass could not be converted to string in /in/fG159 on line 34
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Object id #1
Output for 4.3.0 - 4.4.9
Object