Error Expecting T_string Or T_variable Or
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta parse error: syntax error, unexpected '(', expecting variable (t_variable) or '$' Discuss the workings and policies of this site About Us Learn syntax error unexpected expecting & or variable t_variable more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us t_constant_encapsed_string Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like php function you, helping each other. Join them; it only takes a minute: Sign up Parse error: expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in ..? [closed] up vote 0 down vote favorite I tried to put an if statement inside an echo but this parse error came up, is it not possible to do that? should I use heredoc instead? echo " />Yes />No"; php radio-button syntax-error share|improve this question edited Apr 29 '10 at 20:26 500 - Internal Server Error 21.6k63551 asked Apr 29 '10 at 20:22 user306440 3129 closed as too localized by rdlowrey, Jasper, cryptic ツ, Till Helge, Jocelyn Mar 8 '13 at 17:31 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted You can't put inside an echo stateme
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 company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected (T_STRING), expecting variable (T_VARIABLE) [closed] up vote -1 down vote favorite I will be grateful if someone can point out http://stackoverflow.com/questions/2740529/parse-error-expecting-t-string-or-t-variable-or-t-num-string-in where the error is occurring. class hotel extends WishDBxyz{ public nomhotel; protected idhotel, ile_idile, pays_idpays, chainehotel_idchainehotel, actif ; } Just on second line got the error Parse error: syntax error, unexpected (T_STRING), expecting variable (T_VARIABLE). I'm quite new to Object Oriented PHP and writting one class inheriting another class. php class oop inheritance share|improve this question asked Feb 21 '14 at 9:48 Pax 1112 closed as off-topic by Shankar Damodaran, Rikesh, CBroe, kumar_v, andrewsi Feb 22 http://stackoverflow.com/questions/21930748/parse-error-syntax-error-unexpected-t-string-expecting-variable-t-variable '14 at 0:35 This question appears to be off-topic. The users who voted to close gave this specific reason:"This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Shankar Damodaran, Rikesh, CBroe, kumar_v, andrewsiIf this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 5 Answers 5 active oldest votes up vote 4 down vote Those are variables in php.So add the $ sign: class hotel extends WishDBxyz{ public $nomhotel; protected $idhotel, $ile_idile, $pays_idpays, $chainehotel_idchainehotel, $actif ; } share|improve this answer answered Feb 21 '14 at 9:50 Codrutz Codrutz 327412 add a comment| up vote 1 down vote you are missing the $ public $var; see http://www.php.net/manual/en/language.oop5.basic.php share|improve this answer answered Feb 21 '14 at 9:50 po_taka 1,037822 add a comment| up vote 0 down vote Variable names should be prefixed with $ share|improve this answer answered Feb 21 '14 at 9:50 SajithNair 3,3151719 add a comment| up vote 0 down vote You are missing $ in variables class hotel extends WishDBxyz{ public $nomhotel; protected $idhotel, $ile_idile, $pays_idp
that make connections all over the world. Join today Community Community Home https://www.drupal.org/node/484594 Getting Involved Chat Forum SupportInstalling Drupal Parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' on install.php. Posted by justme2013 on June 7, 2009 at http://laravel.io/forum/06-10-2015-laravel-5-error-on-installation 8:39pm Hi, I'm trying to install the 6.12 on a clean webhosting share where I have only FTP access and a root Mysql syntax error Account. I got a error : Parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' on install.php. On this line stands: $module_list['system']['filename'] = 'modules/system/system.module'; As I'm am a new in this I don' know what to do. I only added a line at line 3 to the installation error expecting t_string file: $_SERVER['DOCUMENT_ROOT'] = "d:\www\doamin\www\"; Otherwise I had a problem with references. Can somebody point me into the right direction? Ciao, Log in or register to post comments ⋅ Categories: Drupal 6.x Comments I think this is an issue with coreyp_1 commented June 7, 2009 at 9:37pm I think this is an issue with properly escaping you PHP string. Instead of:"d:\www\dewegvanhetverlangen\www\" try:"d:\www\dewegvanhetverlangen\www\\" -Corey Log in or register to post comments News itemsDrupal news Planet Drupal Association news Social media directory Security announcements Jobs Our communityCommunity Getting involved Services, Training & Hosting Groups & Meetups DrupalCon Code of conduct DocumentationDocumentation Drupal 8 docs Drupal 7 docs Developer docs api.drupal.org Drupal code baseDownload & Extend Drupal core Modules Themes Distributions Governance of communityAbout Web accessibility The Drupal Association About Drupal.org Terms of service Privacy policy Drupal is a registered trademark of Dries Buytaert.
Local Community Meetups Laravel.io Site and Community Forum Installation Laravel 5 Error on Installation. I'm trying to create a new Laravel project via "laravel new project_name" however it stays on crafting the application for a minute or two and then it shows this error: Crafting application... Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T _STRING) or variable (T_VARIABLE) or '{' or '$' in I:\PP\artisan on line 31 Script php artisan clear-compiled handling the post-install-cmd event returned w ith an error [RuntimeException] Error Output: run-script [--dev] [--no-dev] [-l|--list] [script] [args1] ... [argsN] Application ready! Build something amazing. Furthermore, when I go to check the installation in my web browser I'm thrown this error: Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in I:\PP\public\index.php on line 50 Is anyone else facing this error? I've updated my Composer installation as well as the installer for Laravel. xxyxxyz 1 year ago harikt 1 year ago What version of PHP are you using ? xxyxxyz 1 year ago harikt said: What version of PHP are you using ? PHP version is 5.4.16. kayyyy 1 year ago Solution xxyxxyz said: harikt said: What version of PHP are you using ? PHP version is 5.4.16. Installation Server Requirements The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine: PHP >= 5.5.9 OpenSSL PHP Extension Mbstring PHP Extension Tokenizer PHP Extension xxyxxyz 1 year ago chris said: xxyxxyz said: harikt said: What version of PHP are you using ? PHP version is 5.4.16. Installation Server Requirements The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine: PHP >= 5.5.9 OpenSSL PHP Extension Mbstring PHP Extension Tokenizer PHP Extension I see. Thanks, was this changed recently as I had no problems beforehand when making a new Laravel project. tkprocat 1 year ago Yep, it was changed 12 days ago, see https://github.com/laravel/framework/commit/8349040e7381d083868fa40bd7dcaf301f0347e3 dhavalv 4 months ago It's same problem on PHP V5.6.15 PHP Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /opt/lampp/htdocs/laravel_demo/artisan on line 31 ggwebdev 4 months ago I have same problem, check your php version run on shell. In my case the phpinfo shows me 7.0.7 and in my shell runs 5.3.10.... Update php version and i belive it works. Want to reply to this thread? Login with github. Sp