3v4l.org

run code in 300+ PHP versions simultaneously
<?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 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0"; $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(); if($batcache->unique['wptouch']){ echo 'True'; } else { echo 'False'; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Attempt to modify property "unique" on null in /in/QTkvB:32 Stack trace: #0 {main} thrown in /in/QTkvB on line 32
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
53.99 ms | 401 KiB | 8 Q