3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function createVCF() { global $octitle, $nameLast, $nameFirst, $orgAbbrev, $domainname, $year, $month, $monthName, $day, $orgphone, $orgaddress1, $orgcity, $orgstate2, $orgzip, $orgcountryAbbrev, $domainname, $personaleMail, $zhour, $min, $sec; echo ('BEGIN:VCARD<br />'); echo ('VERSION:2.1<br />'); echo ('N:'.$nameLast.';'.$nameFirst.'<br />'); echo ('FN:'.$nameFirst.' '.$nameLast.'<br />'); echo ('ORG:'.$orgAbbrev.'<br />'); echo ('TITLE:'.$octitle.'<br />'); echo ('NOTE:Last updated on '.$monthName.' '.$day.', '.$year.'<br />'); echo ('TEL;WORK;VOICE:'.$orgphone.'<br />'); echo ('TEL;CELL;VOICE:'.$orgphone.'<br />'); echo ('ADR;WORK:;;'.$orgaddress1.';'.$orgcity.';'.$orgstate2.';'.$orgzip.'<br />'); echo ('LABEL;WORK;ENCODING=QUOTED-PRINTABLE:'.$orgaddress1.'=0D=0'.$orgcity.', '.$orgstate2.' '.$orgzip.'<br />'); echo ('ADR;HOME:;;'.$orgaddress1.';'.$orgcity.';'.$orgstate2.';'.$orgzip.';'.$orgcountryAbbrev.'<br />'); echo ('LABEL;HOME;ENCODING=QUOTED-PRINTABLE:'.$orgaddress1.'=0D=0'.$orgcity.', '.$orgstate2.' '.$orgzip.'=0D=0A'.$orgcountryAbbrev.'<br />'); $myPhoto = 'http://www.'.$domainname.'/images/my_photo.jpg'; if (file_exists($myPhoto)) { echo ('PHOTO;JPEG:'.$myPhoto.'<br />'); } else { $myPhoto = 'http://www.'.$domainname.'/images/my_photo.gif'; if (file_exists($myPhoto)) { echo ('PHOTO;GIF:'.$myPhoto.'<br />'); } echo ('URL;HOME:http://www.'.$domainname.'<br />'); echo ('URL;WORK:http://www.'.$domainname.'<br />'); echo ('EMAIL;PREF;INTERNET: '.$personaleMail.'<br />'); if (isset ($googleTalkID)) { if ($googleTalkID != '') { if (isset ($googleTalkIDLoc)) { if ($googleTalkIDLoc != '') { echo ('X-GOOGLE-TALK;TYPE='.$googleTalkIDLoc.':'.$googleTalkID.'<br />'); } } } } echo ('REV:'.$year.twoDigits($month).twoDigits($day).'T'.twoDigits($zhour).twoDigits($min).twoDigits($sec).'Z<br />'); echo ('END:VCARD<br />'); }
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected end of file in /in/IRp88 on line 48
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end in /in/IRp88 on line 48
Process exited with code 255.