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

learn more… | top users | synonyms

1
vote
1answer
30 views

Transferring information between a web server and a Python backend?

I have been Googling my problem but haven't been able to come up with anything; here's the situation: I have a PHP / MySQL website hosted with 1and1.com. I also have a Python program that runs on a ...
-2
votes
0answers
24 views

Why dose PSR-1 avoid any recommendation about property names? [on hold]

Why dose PSR-1 avoid any recommendation about property names? Could not they reach any agreement? I think suggesting a style was much more useful: $StudlyCaps, $camelCase, or $under_score.
0
votes
2answers
99 views

How-To: a browser based, real time, shared memory inspection/debugger application

Background: I have a C application running under Linux utilizing shared memory. I also have a debugger written in Python that can link to said shared memory and access individual variable values of ...
-3
votes
0answers
13 views

how do I display the content of 3 columns from 3 separate tables randomly through an array? [on hold]

I need help to display the content of the columns randomly: $one = "SELECT column 2 FROM table 1 WHERE column 1='1' "; $two = "SELECT column 2 FROM table 2 WHERE column 1='1' "; $three 2 ...
-1
votes
0answers
24 views

Best way to approach building search functionality using PHP on existing mySQL Database

I am looking for advice on how to approach an upcoming project I am due to undertake. The reason I am asking is that I'm just out of college and the company I work for is currently searching for a new ...
0
votes
1answer
92 views

Project directory structure

Actually i'm using this project directory structure http://framework.zend.com/manual/1.12/en/project-structure.project.html But recently i started using namespaces in all my php-classes like: ...
0
votes
1answer
45 views

Storing Form Data in a class

I have a form that writes to a database. Other than creating a class handle an external API, this project is done. However, the processing script is your standard procedural calling of queries using ...
-4
votes
0answers
22 views

How to show php content in inner php code [on hold]

<pre><?php $my_tabs = ' [su_tabs] **[su_tab title="Overview"] '. the_content() .' [/su_tab]** [su_tab title="General Info"] [su_tab title="Photo Gallery"]demo ...
-2
votes
0answers
43 views

Speed up familiarizing process of a new IDE? [on hold]

One of the biggest impediments to me learning the new language is figuring out the "meta-programming" side of it. It's just about using and configuring other software. I'm trying to learn PHP and did ...
0
votes
0answers
8 views

Getting data from one loop to a next [migrated]

I am trying to gett access to the data from this if(isset($_POST['getdata'])) to if(isset($_POST['addto'])) but there is no data being passed and idk why can you help me please. <?php $item = ...
-1
votes
0answers
36 views

Framework abstraction - Software architecture for a big long-term project (PHP, Laravel) [closed]

we are currently working on a bigger platform considered for long-term expansion and development. We started with Laravel (PHP) and built a RESTful API (HAL+JSON, HATEOAS). When i look on the classy ...
-5
votes
0answers
27 views

What sort of thing to avoid and make a habit as Enterprise Software Engineer [closed]

Now a days , its not writing code and change frameworks and language matter the most.most. Of course , in some situation matter,but you know.Most of the time ,clients need some one with "fast coding ...
-1
votes
0answers
38 views

Choice of Web Development Technology [closed]

We are a small team of 1st time developers looking forward to making a custom designed E-commerce website.The technology should be more customizable than content management framework like Joomla, ...
0
votes
1answer
95 views

Different operators in query string like ?var!=value

This one may actually be 2 questions in one. Studying some APIs I came across an api suggesting to have operand different from equal (=) inside the query string (http://www.salesboard.com/api/): ...
0
votes
1answer
177 views

Is not being able to resolve a function call to its declaration a drawback of Polymorphism?

Consider a class that prints an "outline" table for a particular product line. Say you have several, A, B, C, D. The mechanism of the table generation is the same, but the data is different. I ...
-2
votes
2answers
78 views

What should config files and the bootstrap do? [closed]

I already read dozens of articles and questions/answers on SO and Programmers but I can't understand what config and bootstrap files are, in the context of a web application. So my questions are : ...
12
votes
2answers
2k views

Illegal in PHP: Is there an OOP design reason?

The below interface inheritance is illegal in PHP, but I think it would be fairly useful in real life. Is there an actual antipattern or documented problem with the below design, that PHP is ...
4
votes
1answer
462 views

How dangerous is it to take shortcuts when coding Web based applications? [closed]

I started working as a Web developer few months back. Previously, I had no prior professional experience in programming besides school classes and fun-side projects I did on my own. I am the only ...
0
votes
1answer
164 views

Static and not-static: programmer quantum theory

Let me illustrate using the PHP language. The discussion here is, how should I do exactly to solve this problem in a clear and unambiguous mode. Imagine that I have a class called Path. This class is ...
0
votes
1answer
44 views

How to keep class parameters visible while using generic argument passing

After writing some classes where class initialization requires multiple options, instead of writing several parameters into constructors or setters, I started passing an associative array of ...
2
votes
2answers
154 views

How would I allow a PHP front end to communicate with a back end written in Go (or any other combination of languages)?

I like PHP. It's not overly complex to achieve what you want, you can write straight up HTML inside it, and I suppose I'm just used to it. I also like Go, having just discovered it while looking for ...
0
votes
1answer
113 views

Is there a particular coding standard with comments between function name and body?

I'm integrating with a shipping API built in php. They have a strange coding standard where the comments are between the function name and the first curly bracket.. which - subjectively - makes the ...
0
votes
0answers
104 views

How many functions called by other functions are too many?

I posted a question about a week ago about using PHPExcel with multiple cases of use and how to simplify it. Since then my process has simplified as we've agreed to work with a single lay out with ...
0
votes
0answers
92 views

More efficient management of assets(image, documents) in a large web project

I am beginning to refactor a large, very old, messy project. One of the biggest issues is the lack of a central location on the filesystem for simple things like images, icons, documents, csv, etc. ...
0
votes
3answers
177 views

How do I design my application to use REST for itself?

I'm not sure how to ask this. I know this is simplistic, but I understand (I think): REST is an architecture, not required, simply a way to build REST is a style and a community standard for ...
1
vote
1answer
118 views

Progress in PHP web application design [closed]

I have created an easy database-driven web application (with PHP+MySQL). It's written procedurally with a few controllers (index.php) in a few directories and a few template files and one stylesheet. ...
0
votes
4answers
191 views

Notifications system with too many subscribers

In my application users can subscribe to other users, like in every social network out there. However I'm experiencing some trouble when a user has too many subscribers. Every time a user posts ...
1
vote
0answers
32 views

PHPExcel Application With Cases

I've been working on an application for my company's intraweb which will automate production scheduling based on information from our legacy mainframe databases in addition to side tables with ...
-1
votes
0answers
39 views

Clearly defining an Implementation detail [duplicate]

In what way could I, when designing my API, framework or whatever decide what is and what is not an implementation detail? What questions do I ask in order to correctly answer: "Is that something my ...
-2
votes
0answers
23 views

I would like to expand a SQL query to also get the name of the ID's it is selecting. How do I do that? [migrated]

At the moment I have a very basic SQL query, however I would like to expand it in order to fetch the names of the ID's it is referencing as well. The problem is, it's a Parent > Child relationship ...
0
votes
0answers
88 views

Tournament bracket customized algorithm

I'm in the making of a tournament for archery but i'm stuck because they want a specific match-matching for players. There is the usual 1-32,2-31,3-30 etc but the way they want the tree is a specific ...
1
vote
1answer
133 views

Static controllers

I have built myself a PHP MVC framework to meet my needs. As pretty much all of the core classes are static, I just stumbled upon the idea of having static controllers. I know that for some reason ...
0
votes
1answer
44 views

How to implement a Daily Recap email of Database records modified the previous day sent to Subscribed Users like Basecamp does?

I am building a Project Management module for SugarCRM. It consists of a "Project" which has information on the project like Name, description, start and completion dates, creator name, status ...
0
votes
1answer
116 views

PHP as a target language [closed]

Are there stable well tested SDKs (as opposed to simple language converters) that allow you to develop your application in some decent language (I believe it is widely accepted that PHP is not a well ...
0
votes
0answers
66 views

The finer points of HMVC

I'm new to HMVC and whilst tutorials are great about dealing with the overall details of keeping modules separate and only letting controllers communicate, they aren't so great at explaining the ...
0
votes
1answer
51 views

Does phpDocumentor tags order matter?

When we document our class, method and/or function with phpDocumentor, is there any specific order I should follow according to the standards? I know it doesn't matter for output the document. Since ...
0
votes
0answers
41 views

Scale parts of image to fill bezier path with no wastage

I want to be able to take an image and stretch/contract each pixel row (or 5 rows for performance) to fit within a curved shape. I've been searching for this for the last few days and have turned up ...
0
votes
1answer
82 views

How to split a Service class in two but still use them like one?

I've got a class: AuthenticationService findLoggedInUser() Checks session if User is logged in. If not, check client persistent user login cookie and log in. loginUser($email, $pw, $remember = ...
-2
votes
2answers
116 views

php make dollar optional [closed]

Is there any reason the PHP language could not be updated in a future version to make the $ prefix on variable names optional? Reasons that would break existing code? I'm thinking it would still be ...
1
vote
2answers
223 views

Workflow for obfuscated PHP code with PHP protect

Let's say I have a database-driven web application written in PHP. After obfuscating the code with PHP protect it will be copied to a web hosting server. And here is the question. What is the ...
2
votes
1answer
116 views

How to tell the View to create a cookie?

I have a LoginService class with loginUser($email, $password, $remember = false) method in the application layer of my model layer. Now, if $remember is true it needs to create a persistent user ...
3
votes
4answers
374 views

Why is the use of conjunctions in method names a bad naming convention? [closed]

In my team, we work closely with a few software architects. They approve all design decisions of our projects, do some code reviews etc. Our projects consist mainly of backend functionality ...
0
votes
1answer
159 views

Version controlling of a web project

We (2 developers) are developing a cakephp app that is running on a remote server. In NetBeans we both have project set up as "PHP application from remote server". The problem is that whenever one of ...
2
votes
1answer
130 views

Using the command pattern for a sequence of tasks

I have a 'sequence of tasks' to undertake on a zip file. It can be simplified into these steps: Validate that the file is a ZIP file and is valid Unzip the file Validate the contents are as ...
0
votes
1answer
119 views

Viable method of sharing our PHP project [duplicate]

We are two developers that have no previous experience in sharing one PHP project. In particular, cakePHP. We both use NetBeans and we have set the project up as a "PHP application from a remote ...
1
vote
1answer
147 views

In MVC design, do I use a base class over an interface?

In web MVC most designs I've seen, (just choosing model layer as an example) the domain problem class, say students, always inherits the superclass "Model." The name is irrelevant, but why do they ...
3
votes
2answers
128 views

Whether to store all numbers or just their ranges in database for this application

I'm developing a (PHP MySQL) Web App which will sell dynamically generated real time cell phone numbers for cellular companies. A company will ask for, say, a thousand numbers and this app will check ...
0
votes
1answer
142 views

How do I keep my classes in MVC from becoming bloated?

I'm not sure how I should have worded the question. If I have a Student and Classes database, and I have queries that involve both. Where do I put my queries? In one case, someone wants student ...
0
votes
1answer
80 views

Efficiency of getters/setters with database performance

I'm currently in the process of refactoring a very old personal project of mine, which used procedural PHP-in-HTML code. I'm modernising it as a learning project, using OOP where beneficial. I ...
0
votes
0answers
45 views

Database conceptual Question [duplicate]

When querying in database through PHP, is it good to open mysql connection before every query and close it as the query completes? or should we open the mysql connection as soon as the first query ...