3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $expr = '#<meta\s+name\s*=\s*([\'"])http_equiv\1\s.*?content\s*=\s*([\'"])text/html\s*;\s*charset\s*=\s*([^,>\2]+)#i'; $subject = <<<HTML <HTML> <!-- $Revision: 317718 $ --> <HEAD> <TITLE>PHP Manual</TITLE> <META NAME="HTTP_EQUIV" CONTENT="text/html; charset=UTF-8"> <LINK REL="STYLESHEET" HREF="style.css"> </HEAD> HTML; preg_match($expr, $subject, $matches); var_dump($matches);
Output for 5.0.4 - 5.2.2, 7.0.0 - 7.1.0
Notice: Undefined variable: Revision in /in/FPsem on line 6 array(4) { [0]=> string(58) "<META NAME="HTTP_EQUIV" CONTENT="text/html; charset=UTF-8"" [1]=> string(1) """ [2]=> string(1) """ [3]=> string(6) "UTF-8"" }
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: Revision in /in/FPsem on line 12 array(4) { [0]=> string(58) "<META NAME="HTTP_EQUIV" CONTENT="text/html; charset=UTF-8"" [1]=> string(1) """ [2]=> string(1) """ [3]=> string(6) "UTF-8"" }
Output for 5.2.3 - 5.6.28
Notice: Undefined variable: Revision in /in/FPsem on line 11 array(4) { [0]=> string(58) "<META NAME="HTTP_EQUIV" CONTENT="text/html; charset=UTF-8"" [1]=> string(1) """ [2]=> string(1) """ [3]=> string(6) "UTF-8"" }
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: Revision in /in/FPsem on line 6 array(4) { [0]=> string(58) "<META NAME="HTTP_EQUIV" CONTENT="text/html; charset=UTF-8"" [1]=> string(1) """ [2]=> string(1) """ [3]=> string(6) "UTF-8"" }