Php Parse Error Syntax Error Unexpected T_paamayim_nekudotayim Expecting T_variable
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the parse error syntax error unexpected t_paamayim_nekudotayim wordpress company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions syntax error, unexpected 'protected' (t_protected) Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million php parse error syntax error unexpected expecting programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting T_VARIABLE [duplicate] up vote 0 down vote favorite This question already has an answer
Syntax Error, Unexpected '::' (t_paamayim_nekudotayim) Laravel
here: PHP expects T_PAAMAYIM_NEKUDOTAYIM? 7 answers Why is my website generating this error: Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting T_VARIABLE This is the code being executed: public function __construct($name, $path = false, $options = false) { if ($path !== false) { static::configure('cache_directory'); } if ($options == true) { $name .= '-'.$_SERVER['REMOTE_ADDR']; } $this->file_path = static::configure('cache_directory') .'/'. $name . '.idx.php'; } php syntax-error share|improve this question edited Apr 9 '15 at 13:28 Kev parse error: syntax error, unexpected '[' php 83k36227317 asked Nov 28 '13 at 22:29 user3047472 11 marked as duplicate by andrewsi, Shaiful Islam, karthik, greg-449, EdChum Jul 5 '15 at 8:18 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. add a comment| 1 Answer 1 active oldest votes up vote 4 down vote That's hebrew for "double colon". static::configure is likely what's causing problems. static is a PHP keyword - I doubt you can use it as a class name. If you're trying to use late static bindings, make sure you've got PHP 5.3 or higher... share|improve this answer answered Nov 28 '13 at 22:30 ceejayoz 116k27179260 add a comment| Not the answer you're looking for? Browse other questions tagged php syntax-error or ask your own question. asked 2 years ago viewed 2255 times active 1 year ago Linked 344 PHP expects T_PAAMAYIM_NEKUDOTAYIM? Related 344PHP expects T_PAAMAYIM_NEKUDOTAYIM?0Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' line 100-1Parse error: syntax error, unexpected T_VARIABLE-3Parse error: syntax error, unexpected '{', expecting '(' on line 32206PHP Parse/Syntax Errors; and How to solve them?0Parse error: syntax error, unexpected T_VARIABLE in … on line 1-1Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or ' with PDO2Parse error: syntax error, unexpected (T_VARIABLE)-2PHP- P
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn php static vs self more about Stack Overflow the company Business Learn more about hiring developers or
Bdfl
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Scope Resolution Operator
Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting T_NS_Separator up vote 10 down vote http://stackoverflow.com/questions/20275629/parse-error-syntax-error-unexpected-t-paamayim-nekudotayim-expecting-t-variab favorite 1 I moved an application from an Ubuntu11.04 (Natty Narwhal) Server to a Red Hat Enterprise Linux (RHEL) server over the weekend. My error log is full of the PHP errors in the subject line referencing the following function: function wfTalkHereArticleFromTitle( &$title, &$article ) { global $wgRequest, $wgTalkHereNamespaces; if (isset($title->noTalkHere)) return true; //Stop recursion $action = $wgRequest->getVal( 'action' ); $oldid = $wgRequest->getVal( 'oldid' ); $diff = $wgRequest->getVal( http://stackoverflow.com/questions/8734823/unexpected-t-paamayim-nekudotayim-expecting-t-ns-separator 'diff' ); if ($action == 'purge') $action = NULL; //"purge" is not considered an action in this context if ($action || $oldid || $diff) return true; $ns = $title->getNamespace(); if (!Namespace::isTalk($ns) && Namespace::canTalk($ns) && $title->exists() && ( !$wgTalkHereNamespaces || in_array($ns, $wgTalkHereNamespaces) ) ) { $tns = Namespace::getTalk($ns); $talk = Title::makeTitle($tns, $title->getDBKey()); if ($talk && $talk->userCan('read')) { $t = clone $title; $t->noTalkHere = true; //Stop recursion $a = MediaWiki::articleFromTitle( $t ); $article = new TalkHereArticle( $a, $talk ); } } return true; } The error is thrown in the If (!Namespace::isTalk($ns) statement. This error is a new one for me. How might I resolve it? I changed the offending code to: if ( !Ns::isTalk($ns) && Ns::canTalk($ns) && $title->exists() && ( !$wgTalkHereNamespaces || in_array($ns, $wgTalkHereNamespaces) ) ) { $tns = Ns::getTalk($ns); $talk = Title::makeTitle($tns, $title->getDBKey()); if ($talk && $talk->userCan('read')) { $t = clone $title; $t->noTalkHere = true; //Stop recursion $a = MediaWiki::articleFromTitle( $t ); $article = new TalkHereArticle( $a, $talk ); } } return true; Would that suffice to fix the error, at least in this file? php syntax-error share|improve this question edited Dec 20 '15 at 20:56 Peter Mortensen 10.3k1369107 asked Jan 4 '12 at 22:11 SidC 1,44384396 1 @Charles hehe
head or falling about laughing and calling your mates in to view the screen (‘cos you can't pronounce the words) just make sure that all your variables have their $s in tact! Googling for it will come up with interesting etymology when you have the https://maryh.wordpress.com/2007/07/16/ive-just-had-the-expecting-t_paamayim_nekudotayim-error/ time. Like this:Like Loading... Related 18 Responses to "I've just had the expecting T_PAAMAYIM_NEKUDOTAYIM error" Shai Mishali Says: May 1, 2008 at 5:24 am Paamayim Nekudotaim means dobule colon - :: Reply maryh Says: May 1, 2008 at 12:39 pm Thanks Shai, now everyone can see the meaning here too! I believe it is from the Hebrew - because of where php was mostly developed? I have never had cause to use a :: in my code but syntax error I sometimes forget the $ on a variable! Reply Coder shmoder Says: September 30, 2008 at 3:35 am Hah, I just HAD to google this one (hence my arriving here), holy crap talk about ridiculous errors. It actually *was* the missing ‘$' too, lol. Reply markharrison Says: October 2, 2008 at 1:25 pm Yes - I've found lots of sites that explain what it means… but none that say "fix the $s", which was what I needed. Thanks, Mary! Reply parse error syntax Stig Says: November 11, 2009 at 12:13 pm Haha, I had too google this one too, "expecting T_PAAMAYIM_NEKUDOTAYIM" wtf I though php was playing with me, but I was missing the a "$" Reply Matt Says: February 2, 2010 at 4:35 am Wow, mine wound up being the missing $ as well, but I do have to admit that this is the funniest error I've ever run up on whilst coding in PHP. Reply Matt Says: April 23, 2010 at 4:08 pm From the founder of WordPress.com, thank you for this.🙂 Reply json Says: October 4, 2010 at 7:34 pm Using if(!isset(session_start)){… will throw this error: Parse error: syntax error, unexpected ‘)', expecting T_PAAMAYIM_NEKUDOTAYIM in path/to/file.php on line x Reply XYDAC Says: July 19, 2011 at 7:41 am Gosh how easy would it be for Hebrew people who wouldn't have to google for what that error means.:) Reply snypez Says: November 11, 2011 at 3:07 pm I got it using isset() instead of defined() on a constant haha Reply Chris Says: November 14, 2011 at 2:36 pm Thanks! Developer at CNET Reply mediadiplomats Says: December 1, 2011 at 10:34 am Thanks Reply Blake Says: December 10, 2011 at 7:33 pm PHP is waxing so poetic today, I got the "expecting T_PAAMAYIM_NEKUDOTAYIM" and "Fatal Flex Scanner Internal Error" within one exciting half-hour. Reply Squall_ Says: February 21, 2012 at 10:05 am I also got this error when calling empt