3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($html) { $matched = preg_match('/<meta[^>]*name=[^>]*viewport[^>]*>/', $html, $matches); if (!$matched) { return false; } if (preg_match('/(user-scalable=(0|no)|scale)/', $matches[0])) { // 95% of the time this indicates true mobile compatibility (cf SYS-1289) return true; } if (preg_match('/width=(\d{2}|[7-9])\d{2}/', $matches[0])) { // Specifying a width of other 700px, doesn't sound very mobile compatible (cf SYS-1289) return false; } // At this point some websites are mobile compatible, others aren't, so we'll just go with the most likely return true; } var_dump(test('<meta content="width=1024" name="viewport"/>'));
Output for git.master, git.master_jit, rfc.property-hooks
bool(false)

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:
39.51 ms | 401 KiB | 8 Q