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

learn more… | top users | synonyms

-3
votes
0answers
21 views

PHP Syntax Highlight in Sublime Text [on hold]

I've got issues with syntax highlighting for in folowing cases: How can I get variables highlighted when mixed with strings?
0
votes
0answers
54 views

PHP Password_Hash Function [migrated]

I've been reading up on the usage of the PHP Password_Hash Function it states that it automatically generates a salt and manually generating one is not advised. With this in mind, does this mean I ...
-3
votes
0answers
37 views

Error authentication failed [on hold]

I have a login form that contains a login and password, I received an error failure to identify: class Admin_IndexController extends Zend_Controller_Action { private $_form; public function ...
-2
votes
0answers
65 views

files / folders structure for Factory and Repository design patterns [on hold]

This the first project for me using Factory and Repository design patterns I don't really know ho to organize files/folders and which names to use. (I'm also very new using namespaces and psr-4 ) ...
2
votes
0answers
49 views

Use and manage Front End Assets for Web

I am a beginner and am currently developing a kind of cms using PHP. The number of libraries that we can potentially use in the front end is large. I have a question about properly selecting, ...
-4
votes
0answers
26 views

System proposal for an online application system [closed]

Please help me with setting S.M.A.R.T objectives for a system proposal for an online application licence system. Generic objectives like increasing efficiency, providing back up facility are not ...
-1
votes
0answers
20 views

How to access the nth object in a Laravel collection object? [migrated]

I have a laravel collection object. I want to use the nth model within it. How do I access it? Edit: I cannot find a suitable method in the laravel documentation. I could iterate the collection in ...
-4
votes
0answers
34 views

Wondering why button is not executing code [closed]

I made a submit panel in the nav to submit files to a website I am currently working on. Dopeyemine.com For some reason the "Submit" button in the submit panel is not working. Please review the ...
-1
votes
1answer
77 views

Cloud Newbie … what should I know while creating my App [closed]

I never developed for the Cloud, and to tell you the truth I am not fully 100% sure of what Cloud is when coming down to servers and services. I am starting to develop an App where I will need to be ...
-3
votes
0answers
45 views

roadmap for good career opportunities for a web developer [closed]

I am a web developer working in India with a web product based company. I have an experience of 2.7 years working with php ,cakephp , mysql and javascript. I want to work for enterprise level projects ...
-3
votes
0answers
32 views

How do CMS'es work without include and require functions [closed]

I am interested in knowing why or how do CMS like wordpress/drupal/joomla/opencart don't have any require and include functions and how does the template is being detected and works without does ...
-1
votes
2answers
171 views

Is PHP the only popular language that mixes simple and associative arrays into a single type? [closed]

I'm doing a research on PHP and wondering if there any other commonly used programming langues that use an associative array for both simple indexed element storage and key-value functionality. Does ...
1
vote
1answer
57 views

Web Application: Combining View Layer Between PHP and Javascript-AJAX

I'm developing web application using PHP with CodeIgniter MVC framework with a huge real time client-side functionality needs. This is my first time to build large scale of client-side app. So I ...
-3
votes
0answers
45 views

What should PHP programmer use for smartphone development? [closed]

I like to create web applications, but I want to be able to create some simple smartphone apps (GPS, camera, filesystem, notifications, network access, ... ). I'm thinking about Titanium SDK, but ...
0
votes
1answer
69 views

When to used static visibility? [duplicate]

I can't attain the primary used of Static Visibility. My question is why they used static method & properties in this code? class PassHash { // blowfish private static $algo = '$2a'; ...
0
votes
0answers
6 views

Bootstrap Active tab on modal hidden [migrated]

I am using Bootstrap as Framework for designing a form, the form has fields in several tabs, I added a onSubmit event that displays a modal if there are any empty field cancels the submit and focuses ...
-1
votes
1answer
27 views

php and mysql hosting service that fulfills my registeration system [closed]

Kindly tell that how to make a registration system that work with php and MySql . I tried the demo that is here but how it works with the online web hosting . I have registered the free hosting at ...
0
votes
0answers
78 views

A kind of actions handler on my PHP project? [migrated]

I wanted to do something like actions handler. I don't know how it should look like. But I started to make something like that: MySQL: CREATE TABLE `handlers` ( `name` varchar(65) NOT NULL default ...
-2
votes
4answers
219 views

What is the name of this design pattern? [closed]

I have been using this "design pattern" (may or may not be an "official" design pattern) for a while and I wanted to know if it had a name (so that I could name my classes after it). Example in PHP ...
0
votes
0answers
24 views

Laravel 4: Binding/linking two users together

I'm building a unittest system. At some point I want to bind two users together in order to make an assignment for those two. So when the admin chooses to link two students together the system should ...
1
vote
1answer
83 views

Taxonomy / Classification of real world objects. Development suggestions [on hold]

I have to develop a taxonomy/classification program based on classification algorithms and i would like to have some suggestions. The aim is to help the one using the program to categorize an object ...
0
votes
0answers
12 views

Writing Models in PyroCMS/Codeinighter Models

In Pyrocms there are Admin views and User views. Im developing a complex module where my model file is getting to be rather large. Should I be abstracting logic in my model files to also be User ...
0
votes
2answers
119 views

Flaws in my PHP development setup - sharing sources causing lags

I have following development setup for my PHP projects: Working station running on Windows 7 with PhpStorm IDE. GIT for version controlling. CentOS on virtual machine (VirtualBox) with Apache and ...
0
votes
2answers
134 views

Failed to allocate memory - What is it trying to say?

In my early days of programming I often used to get memory related fatal errors in the following format: Fatal error: Allowed memory size of <some big number> bytes exhausted (tried to ...
-1
votes
1answer
103 views

Face Recognition(OpenCV) with MySQL and PHP

First of all I have asked this question on stackoverflow and got down vote for question being not belonging to the site. I am trying my luck se now(more suitable to se I guess) and I hope I will not ...
-1
votes
0answers
5 views

Creating PHP Forms with show/hide functionality [migrated]

I want to create two reports and submit the report data to database by using two functions defined in a class: Here I have two buttons: "Create ES" and "Create RP". Rightnow, my forms are working ...
1
vote
1answer
184 views

Advice on refactoring PHP Project

I have a small SAS ERP that was written some years ago using PHP. At that time, it didn't use any framework, but the code isn't a mess. Nowadays, the project grows and I’m now working with 3 more ...
7
votes
1answer
124 views

Securely sending data from shared hosted PHP script to local MSSQL

I'm trying to add data from a webhook (from a web cart) to a local Microsoft SQL Server. It seems like the best route for me is to use a PHP script to listen for new data (POST as json), parse it, ...
2
votes
1answer
72 views

Do objects maintain identity under all non-cloning conditions in PHP?

PHP 5.5 I'm doing a bunch of passing around of objects with the assumption that they will all maintain their identities - that any changes made to their states from inside other objects' methods will ...
1
vote
1answer
27 views

Correct process for creating builds reliant on 3rd party packages

I work on a Symfony 2 codebase. We use a number of third-party packages (most are in the Symfony Standard Edition). We use composer for dependencies. We current have all of our third-party code ...
0
votes
0answers
69 views

Penny auction concept and how the timer works

I am creating a penny auction site using PHP yii framework. The main consideration of the system is to update the database records of all active auctions (max 15 auctions) with the current ticker ...
0
votes
1answer
129 views

Website File and Folder Structure

I am having a problem learning how proper website structure should be. And by that I mean how to code the pages and how folder structure should be. Currently I am navigating around my website using ...
0
votes
1answer
51 views

exception for string literal conventions

If I'm used to use ' for string literals in PHP, would it be better if I'll stick to it in any situation or can there be exceptions when it would increase readability? example: $foo = "bar'baz"; // ...
0
votes
0answers
76 views

Static methods and static functions? [duplicate]

I want to call a function in a static context in a class. For instance: class test { public function a1() { //do something... } public static function a2() { . . . $this->a1(); } but $this is ...
0
votes
0answers
42 views

ffmpeg: cut multiple input files with seeking to one output file

I have list of video files (loaded from database), each with start and end time of requested interval: # file begin end v1.mp4 1:01 2:01 v2.mp4 3:02 3:32 v3.mp4 2:03 5:23 And ...
0
votes
2answers
336 views

Why elseif instead of else if?

Few days ago I stopped on some PHP's developers quide (for contributors to particular project) and it stated, that elseif must be strictly used instead of else if -- without giving any reason, why? ...
0
votes
2answers
103 views

Image caching when rendering the same images on different pages [closed]

I'm told to think about caching of images that will be displayed on the page. The images will be repeated throughout the website on different pages and I'm told to figure out the best way to cache ...
1
vote
0answers
100 views

Websockets VS SSE

Suppose I have a service which requires to seek the database for different data once and in a while. For this I have 2 or 3 SSE, each one with a different retry basetime (20000 miliseconds, 1000 ...
0
votes
1answer
196 views

Should I use my own public API on my site (via JS)?

First of all, this question is far more different other 'public api questions' like this: Should a website use its own public API?, second, sorry for my English. You can find the question summarized ...
1
vote
1answer
89 views

How to properly handle conditional dependencies in a factory?

Let's say you have a string $action run-time, that specifies which type of $object needs to be created: $dbobject, $memcacheobject, $fileobject, $xmlobject, etc. Assume also, that creation of an ...
1
vote
2answers
205 views

Should you use PHP to render the html page or use javascript frameworks? Server-side page rendering or client-side page rendering? [closed]

This may be a inappropriate question, but I'm really need help demystifying this. Suppose we want to create web application like reddit or Gmail. The way I understood it from my research is that ...
0
votes
1answer
84 views

Javascript based application controller in Javascript-less environments

I just got done watching an informative Box tech talk by Nicholas Zakas on a javascript architecture for web development: https://www.youtube.com/watch?v=mKouqShWI4o&feature=youtu.be This image, ...
0
votes
1answer
115 views

Applying DDD to a simple app with a configuration twist

I’m using the light-weight PHP Fat-Free Framework as a base to form a simple MVC based app with DDD philosophy for the Model layer. I’m aware that DDD is most suitable or enterprise solutions and that ...
0
votes
1answer
110 views

What is the proper way to extract and pass parameters to call javascript functionality from my PHP page?

This is my situation: I have a search results page in PHP where most of the logic resides in a javascript file in order to avoid refreshing the page every time an action is performed. The first thing ...
0
votes
1answer
102 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 ...
0
votes
0answers
37 views

Is there just one EventHandler class per application?

In a game I'm making I was about to add a MovementEventHandler, with events like "pre-character-movement" and "post-character-movement". But this class will do exactly the same as a future ...
0
votes
1answer
43 views

Restricting object types that can be added to each other using the Composite Pattern

The Situation: I am building a custom PHP application framework. I have implemented a composite pattern so I can build a object tree representing the page to be rendered. Example: abstract class ...
0
votes
0answers
53 views

Import data and modify

I should build an importer in PHP. So below you can see how it should work or how it currently works. This is only a small example, the real importer is much bigger so the import() method is also ...
0
votes
1answer
232 views

Many-to-many in OOP: Class A instantiates Class B, which instantiates Class A, which

I am mapping Field1 to Field2. The map object instantiates the field object and vice versa, creating an infinite loop. This is in PHP. class field { protected $maps; // mapCollection object. all ...
2
votes
0answers
63 views

How to build child classes as parent configuration?

I'm using Codeigniter PHP Framework for developing a web application, and when developing an admin zone, I've ended building a generic parent class called AdminController which is extended by the ...