Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 50440

Questions about PHP, a widely-used general-purpose scripting language that is especially suited for Web development.

3 votes

Reducing number of php files used in project

Maybe this is a good point to start applying some design patterns and good old OOP princiles. AFAIK having many files isn't bad as long as the application is structured correctly. If you follow the …
Songo's user avatar
  • 6,663
1 vote

Should I pass an object or values?

Well the way I do it is like this: The Controller: Should be responsible for interacting with the view and choosing the appropriate Application service. So read the input from the request object and …
Songo's user avatar
  • 6,663
3 votes
3 answers
2k views

Shared hosting for a PHP application

I was reading Essential PHP Security and chapter 8 talks about problems with hosting your PHP app in a shared hosting environment. … By default, PHP stores session data in /tmp which is writable by all users, so Apache has permission to write session data there. …
Songo's user avatar
  • 6,663
4 votes

What is a good starting point for small scale PHP development and would a framework be overk...

Well my advice for you is to use MVC and a PHP framework. This will let you focus more on developing the application itself rather than the basic setting up of the project structure. …
Songo's user avatar
  • 6,663
4 votes

Service layer design

Well, I think RegistrationService is more intent revealing. One can easily speculate on what function can be found there such as registerUser(), ConfirmRegisteration(), ResetPassword(),...etc. To me …
Songo's user avatar
  • 6,663
9 votes
6 answers
8k views

Best way to parse a file

Now my system is built on PHP and I was able to create parser using regular expressions for each segment, but the problem is not everybody implements the standard perfectly. …
Songo's user avatar
  • 6,663
0 votes
1 answer
169 views

How do you detect lying Stubs/Mocks?

Consider this piece of code from the PHPUnit manual(I'm using PHP only as an example): class StubTest extends PHPUnit_Framework_TestCase { public function testStub() { // Create a stub …
Songo's user avatar
  • 6,663
7 votes
1 answer
173 views

Is it possible to build a single game to run in Facebook & Google+?

I was asked by my customer to build a Facebook game. The game would be something similar to Mafiawars.com where the game is hosted on a server and run through a frame on Facebook. The thing is after …
Songo's user avatar
  • 6,663
5 votes
2 answers
2k views

Where should the database and mail parameters be stored in a Symfony2 app?

In the default folder structure for a Symfony2 project the database and mail server credentials are stored in parameters.yml file inside ProjectRoot/app/config/parameters.yml with these default values …
Songo's user avatar
  • 6,663
7 votes

DDD: Creating reusable modules and service type distinctions (Domain, Infrastructure, Applic...

PHP might not be the best place to start learning about DDD since many of the PHP frameworks out there (Laravel, Symfony, Zend,..etc) tend to promote RAD. …
Songo's user avatar
  • 6,663
10 votes
4 answers
3k views

Design pattern for handling a response

:D Please don't limit your answer to PHP code and feel free to use the language you prefer. …
Songo's user avatar
  • 6,663
7 votes
5 answers
2k views

How to gain experience? [closed]

I mean I have no problem implementing solutions or adding new modules to the system as I have been working for 2 years already in PHP and MySql. … Notes: I am not looking for resources to learn PHP, MySql, frameworks, ORMs or design patterns. I want knowledge transfer from experienced programmers. …
Songo's user avatar
  • 6,663
16 votes
3 answers
23k views

How to handle monetary values in PHP and MySql?

I've inherited a huge pile of legacy code written in PHP on top of a MySQL database. The thing I noticed is that the application uses doubles for storage and manipulation of data. … However, I have yet to come across a complete solution to how monetary values should be handled in PHP code and stored in a MySQL database. …
Songo's user avatar
  • 6,663
2 votes
1 answer
268 views

How to find classes that use certain DB tables

Problem: I'm asked to prepare a document where all our DB tables are listed and I'm supposed to list all Controllers that uses these DB tables for read and another list for Controllers that do write o …
Songo's user avatar
  • 6,663
4 votes
1 answer
3k views

How to bypass Oauth2 authentication when the client and resource owner is the same entity?

We are currently working on using an API provided by Mercado Libre which is a maket place for selling various goods. Their APIs use OAuth 2.0 for authentication. The problem is that OAuth 2.0 as im …
Songo's user avatar
  • 6,663

15 30 50 per page