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

learn more… | top users | synonyms

0
votes
1answer
29 views

PHP and Subversion workflow

I'm working on a project in a small team at the moment working on a webapp. We originally had 3 on the team with a lead dev and now we've grown to 7 and a lead dev. At the moment our workflow is ...
0
votes
1answer
43 views

How bad is it that my index.php in a Zend Framework MVC application mixes definitions and side effects?

I'm introducing some more coding quality standards and checks via a new project - in particular, the PHP-FIG recommendations. This project using Zend Framework 2, and I have a fairly simple entry ...
-2
votes
0answers
40 views

What's the deal with PEAR for PHP? [on hold]

I'm new to PHP...I keep hearing/seeing older websites refer to PEAR as something to learn, but it looks like most of the packages are not currently maintained and haven't been maintained for years. Is ...
-1
votes
1answer
41 views

Real time message from mobile app to server to another user with php possible?

I have a small mobile game that connects to a web server. Users are given an interval, and they must press a button on their phone before that interval expires, periodically for a certain fixed ...
-5
votes
0answers
51 views

Can you please tell me ideas of a website or an app that you want to be invented? [on hold]

I am a programmer and I want to create a big project. I can code websites, desktop apps, and android. I just have no idea what I should program. Is there any thing that you want a website or app to ...
0
votes
0answers
25 views

Development and testing PHP script that gets variables from external server

I have a web app that sends users to an offsite payment server to complete a transaction, and I'm working on the PHP page that users are returned to upon completion of the transaction. The script uses ...
-4
votes
0answers
57 views

Why is Magento that much difficult , and what tasks will i be working on as a Magento Developer? [on hold]

I saw one question/answer here ,but didnt solve my question. Hi, I am software developer with 2 years of experience. I worked on 1 project till now which was actually theme customization ...
-4
votes
0answers
22 views

Add line breaks in emails sent through SendGrid in PHP [on hold]

I am using sendgrid to send emails in my PHP application but when I add a /n it is not adding a new like. My code is $body = "From: $name\n E-Mail: $email\n Message:\n $message"; and I am ...
1
vote
1answer
41 views

MVC, pagination, and massive search criteria

I am currently working on a project that has a fairly large search form - the form is 30 or fields or more. Now I can of course map this out for routing by having my application pull the parameters ...
0
votes
0answers
38 views

Class Interfaces with Multiple Classes and Dependency Injection

NOTE ON QUESTION TITLE: I did not really even know how to phrase the title so if someone can edit and make it more articulate I would really appreciate it. QUESTION: Basically, what I'm trying to do ...
0
votes
1answer
66 views

PHP - How to structure this application

Sorry if the title is leading.. I'm looking for advice for the following system I am implementing: The system is to provide quotes for customers, this is then exported to PDF and emailed to the ...
-3
votes
0answers
16 views

Which payment service can be used for digital wallet integration in online stores? [closed]

I want to incorporate a digital wallet on my online store, where users can add funds to their account and use it to purchase products. For example, a user may add $10 USD to their account, which they ...
4
votes
1answer
78 views

Social network notification system

Background I am working on an app for a client that includes some social networking features. I was originally developing the mobile front-end, but circumstances have left me in charge of developing ...
-2
votes
0answers
27 views

PHP Static and Normal Functions Calling [migrated]

Can someone explain how these line of code are working class DemoStatic { function normalFunction() { echo "This is the normal function"; } static function staticFunction() { echo "This ...
-4
votes
0answers
16 views

Spotify Logfile export to web DB [closed]

I would like to get access to the Spotify music logfile by using a small script. Then using XML or JSON (no matter how) to export the log file and write it in a database (SQL or NoSQL). Then make it ...
-3
votes
0answers
25 views

How to use Multiple class in javascript function for testmonial? [closed]

I Have Two Div I want Use this Class For Testmonial Show Please Tellme How I use 2 class in one Function.
0
votes
0answers
42 views

How to detect marks on a custom form [closed]

I've created a custom form on paper that will be scanned. The form looks very similar to this lottery ticket form. I think there are several ways to do this. One of the things I've tried using is ...
1
vote
0answers
80 views

Android, PHP session and JSON object retrieval

I am working on an app in android studio.. it currently has a login and registration system that are linked to a database and both work perfectly. I am now trying to carry over the user id value ...
0
votes
1answer
114 views

Java front-end, PHP/MySQL back end methodology

I have been basically out of the programming world for about 10 years, with only a bit of dabbling here and there with small Java utilities and one large Access database I wrote for someone, and some ...
-1
votes
3answers
149 views

Is Perl used for web development? [closed]

I am a web developer. I have been using php for many years and I also know lots of other programming languages so I wanted to try making websites using them. I know Perl and want to make a website ...
-1
votes
0answers
12 views

External entities not working in simplexml [migrated]

I am parsing XML using SimpleXML in PHP 5 and external entities are not working. The XML parses, but the entities just are blank. The underlying library is libxml2. This is the code: ...
0
votes
0answers
69 views

Executing a script continuously

I'm currently working on a PHP script that receives emails sent to a specific address and replies according to their content. It's working great, but now I need it to be executed every 10 seconds. ...
-1
votes
0answers
40 views

PHP variable access across the files [migrated]

I want to get one page variable values to another page. Is it possible to do with $GLOBALS? or else how should i do? I have a variable $url = 'http://' . $_SERVER['HTTP_HOST'] . ...
0
votes
0answers
43 views

Should URL params and request params be stored in the Request object

Is it acceptable if GET parameters don't reside in the Request object, but in the URL? I am writing a small library in PHP, which is to represent the Request/Response as different entities and ...
2
votes
3answers
116 views

Extended usage of an exception

I'm in the process of building a routing system for learning purposes and have encountered an issue which I think is a bit in the grey area of best practices. Can you guys help me decide if this is ...
0
votes
0answers
10 views

PHP Netbeans coding style configuration, where is it? [migrated]

I want to standardize coding style accross all the developers computers in my office, I want to export my netbeans configuration and ask the other programmers to import it on their IDEs, do you know ...
-1
votes
0answers
10 views

Unable to retrieve result data [migrated]

I'm trying to retrieve a set of rows through a query. I am able to retrieve the number of rows using $query->num_rows(). However when I am trying to retrieve $query->result(), I am unable to ...
0
votes
0answers
12 views

Edit files on multiple domains on Mambo CMS

I have multiple domains on same web server, all running on Mambo CMS. Each site uses same template and has roughly same site structure. I need to edit the same page on each website - is there a ...
-3
votes
1answer
109 views

using node.js server with mysql-module and PHP for a penny-auction website? [closed]

I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic. I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
0
votes
1answer
80 views

DI container with multiple instances of same object

I'm looking for idea to make a DI container that can store multiple instances of the same object. Usually, a DI container should store either a single instance of the object, or create new object each ...
0
votes
1answer
88 views

Upgrade object in PHP

I cannot find information on this anywhere so I assume it doesn't exist. It makes much sense for me for such functionality to exist and I want to ask whether it actually does and I am wrong in my ...
0
votes
1answer
85 views

DRY principles vs local-only variable scope in functions (PHP motivated question)

I'm new to programming and in particular new to PHP. I often find that DRY is directly opposed to the principle of keeping variables local in PHP functions. Sometimes I think that it's easier to ...
-1
votes
0answers
20 views

How to distinct vector classes and native classes in PHP autoload? [migrated]

How to distinct vector classes and native project classes in PHP autoload? see a part of the file and namespace structure: app/ app/Models/ app/Models/User.php app/Contoller/ app/Contoller/Login.php ...
0
votes
1answer
125 views

Best OOP practice for object vs dataservice [duplicate]

I am working on a new project and am curious as to how I should go about doing something properly. Lets say I have a table called "leads" in my database. This clearly means that a single "lead" would ...
1
vote
1answer
223 views

How to avoid big class complexity while keeping encapsulation?

I'm developing a PHP library to work with big numbers (at this moment only with a "Decimal" class, but I want to add new classes, to handle Integers, Rationals, and Complex numbers). In any case, the ...
-1
votes
3answers
60 views

What is an initial skeleton of the website called? A Framework? [closed]

I am building a website but I am wondering can I call the initial set of pages a framework? Say I have a project to build a website for a school. Before I start implementing the requirements I have ...
9
votes
2answers
333 views

Should HTTP Request/Response objects be immutable?

I think it's safe to say that most web applications are based on the request/response paradigm. PHP has never had a formal abstraction of these objects. One group is trying to change this: ...
4
votes
3answers
93 views

What is Black Box Testing? Are Functional and Usability Testing its types?

I am writing about testing and I am confused about the following: What exactly is Black-Box testing? Are functional testing and Usability testing two different types of testing and are they types of ...
0
votes
1answer
46 views

PHP Composer vendors licensing

I'm using a composer as a dependency manager for my PHP project. Composer operates as a library, which uses packagist as a software repository to fetch third-party dependencies. I'm interested, ...
1
vote
3answers
199 views

PHP: is read file at every page load too heavy?

In F3 Framework Controller I wrote a function checking whether MySql data are saved in a file, otherwise loading a form to ask users for that data (similar to Wordpress Installation). This function ...
0
votes
3answers
121 views

Selecting between multiple actions in PHP

I have been programming for a number of years now and in PHP for about 4 of those years. I have always wondered what is the best approach when it comes your program deciding what action to take based ...
2
votes
1answer
189 views

Hidden dependencies - why not?

Hidden dependencies: function __construct($dep_registry){ $this->db = $dep_registry->get('db'); $this->request = $dep_registry->get('request'); ... } Not so hidden: function ...
1
vote
1answer
111 views

Using exceptions as regular objects [duplicate]

I have views that handle different errors in my application. For example error 404, 403 and such, giving my errors a more user-friendly presentation. By assumption, they get passed in an exception, so ...
0
votes
1answer
56 views

Test logic with external data [duplicate]

I have a site programmed in PHP where I make more call to external server that return me big xml of data. For each record of the xml I have to make other external call to get other data. So my ...
0
votes
1answer
86 views

Multiple method calls in the constructor and dependency injection

I was asked to refactor some almost ureadable spaghetti code into object-oriented architecture. I have some doubts regarding a class that I designed. Here is the class' skeleton: require_once ...
0
votes
1answer
87 views

Cleanly using PHP Iterator class in Loops - calling first element

I have implemented the Iterator class in PHP and built the follow mandatory methods as follows class I implements Iterator { private $a = []; function __construct(array $a) { ...
0
votes
0answers
25 views

Will turning error reporting and error display on and off throughout the stack cause a problem with PHP

I want to turn error reporting and error display on and off for different parts of the same framework (same stack and scope). ini_set('display_errors', 'On'); Changing to 'Off'. ...
2
votes
2answers
151 views

How to store data in memory(RAM) using php without using Memcache/Redis or any other software? [closed]

I want to implement a cache system in PHP consisting of following features 1) It should be able to store any(large or small) amount of data as long as the memory serves.(key value pair i.e. get & ...
1
vote
5answers
361 views

Are there too many parameters in this constructor? [duplicate]

Check this out: public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Registry $registry, ...
4
votes
3answers
166 views

Better way of manipulating large objects

I am doing a lot of work with SOAP Api in PHP and the objects that are returned are quite big. I am then updating the objects from local db changes and pushing them back. So more often than not I ...