3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php list($user_id, $focus_x, $focus_y, $focus_width, $orientation) = ["756272","0","0","350","1"]; $focus_x = preg_match('/^\d+$/)', $focus_x) ? intval($focus_x) : -1; $focus_y = preg_match('/^\d+$/)', $focus_y) ? intval($focus_y) : -1; $focus_width = preg_match('/^\d+$/)', $focus_width) ? intval($focus_width) : -1; $orientation = intval($orientation); if ($focus_x >= 0 && $focus_y >= 0 && $focus_width > 0) { echo "yehu"; }
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Warning: preg_match(): Unknown modifier ')' in /in/8aG1g on line 5 Warning: preg_match(): Unknown modifier ')' in /in/8aG1g on line 6 Warning: preg_match(): Unknown modifier ')' in /in/8aG1g on line 7
Output for hhvm-3.15.4
Warning: Unknown modifier ')': [/^\d+$/)] in /in/8aG1g on line 5 Warning: Unknown modifier ')': [/^\d+$/)] in /in/8aG1g on line 6 Warning: Unknown modifier ')': [/^\d+$/)] in /in/8aG1g on line 7