Jump to content


Photo

<? ?> vs <? Php ?>

php question

  • Please log in to reply
7 replies to this topic

#1 middlecat

middlecat

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 21 February 2014 - 04:43 PM

Hi,
I've been told it would be best to change my code to update it. The example given was change from its current state of <? ?> to <? Php ?>

I am not a dev so want to ensure this is a legitimate request given the cost estimate is much higher as a result.
Any advice would be greatly appreciated.
Thanks

#2 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,457 posts

Posted 21 February 2014 - 04:48 PM

the short opening tag is not always enabled, resulting in code that is not portable between different php configurations.

 

there should be little to no cost in converting code to use full opening php tags. it would take about two minutes using a couple of search/replaces with a editor that can operate on all files within a project.

 

edit: and i just noticed you posted this in the html help forum. moving to the php help forum....


Edited by mac_gyver, 21 February 2014 - 04:50 PM.

multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting. 


#3 WebStyles

WebStyles

    Advanced Member

  • Members
  • PipPipPip
  • 1,215 posts
  • LocationEurope

Posted 21 February 2014 - 05:00 PM

yes, by all means, change them, but be aware you may have parts in you code like this:

<?=$variable;?> (very common amongst people who use short tags) This case is shorthand for an echo and should be changed to <?php echo $variable;?>

 

also, in your initial post you wrote <? Php ?>... it's <?php to open and ?> to close (there's no space between ? and php )

 

hope this helps


Need a Web Developer? Check out ClickWorks.org | I work on a PAY-WHAT-YOU-WANT basis (because the world needs a change)

 

"If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands!"

-- Douglas Adams


#4 .josh

.josh

    .josh

  • Staff Alumni
  • 14,821 posts

Posted 21 February 2014 - 05:26 PM

I am not a dev so want to ensure this is a legitimate request given the cost estimate is much higher as a result.


I'm curious about how the cost estimate is much higher because of this.. it's a legitimate request, but it doesn't sound like you're being given a legitimate estimate. But then, I haven't seen your site, so take that for what it's worth.

Did I help you? Feeling generous? Donate to me! || Donate to phpfreaks!
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#5 middlecat

middlecat

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 21 February 2014 - 06:46 PM

Thanks all. He just said via skype IM that the code was outdated and he thought it best to update now (with the shirt tags as an example). The reason I was surprised is that This is the second phase of my project. I started with a dev who had other commitments so this guy took over. In phase 1 new contractor was saying that he was having to work through the code as it was outdated but he still made the entire site responsive and completed a heap of requirements. Now In phase 2, I have a third the volume of requirements which are mainly bugs rather than new dev, and he has quoted me the same price as phase 1where there were 3 times the requirements and he worked to make it responsive.

#6 WebStyles

WebStyles

    Advanced Member

  • Members
  • PipPipPip
  • 1,215 posts
  • LocationEurope

Posted 21 February 2014 - 07:03 PM

There's a freelance section here on phpFreaks... maybe you can go get a cheaper quote for the job ;)


Need a Web Developer? Check out ClickWorks.org | I work on a PAY-WHAT-YOU-WANT basis (because the world needs a change)

 

"If it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands!"

-- Douglas Adams


#7 .josh

.josh

    .josh

  • Staff Alumni
  • 14,821 posts

Posted 21 February 2014 - 07:13 PM

"3 times the requirements" is a loaded statement though. 9 little things can take the same time as 3 big things. Again, I can't judge since I don't know the details but the best thing you can do to ensure you're getting a fair price is to get multiple quotes.

Did I help you? Feeling generous? Donate to me! || Donate to phpfreaks!
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#8 Psycho

Psycho

    Advanced Member

  • Gurus
  • 10,778 posts
  • LocationCanada

Posted 21 February 2014 - 11:45 PM

I'd also add that there is an old axiom that is mostly true. It takes 10% of the work to get 90% done and another 90% of the work to complete the last 10%.

 

It's easy to build something brand new that does "X". But, then when you add a new requirement to do "Y" it takes a lot more effort since you have to go back and refactor the original code.


The quality of the responses received is directly proportional to the quality of the question asked.

I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com