Questions tagged [php7]

PHP 7 is the successor to PHP 5.6, it was released on December 3, 2015. Use this tag for issues relating to development using PHP 7

Filter by
Sorted by
Tagged with
2 votes
0 answers
48 views

Magic Class Invoker for procedural script

I have inherited a project in bad conditions that contains the following class and I need your help to improve it, the truth is I don't know if it is correctly optimized or if it has security problems ...
user avatar
-1 votes
1 answer
31 views

Find qualifications that are expiring [closed]

I have the following function that returns StaffQualifications where either the qualification is expiring or the qualification type is expiring, but this section doesn't seem to sit well with me as it ...
user avatar
0 votes
0 answers
14 views

PHP Class(es) for setting up DB adaptor

Not sure if I have gone over board with this or if I have even approached it correctly. Basic I wanted to created classes which fulfilled the following: Single class that can be used to create a ...
user avatar
1 vote
1 answer
53 views

Building a pre-loader for performance gains in Wordpress

As the title states, I am building a pre-loader for Wordpress running on PHP 7.3.5+ that will deliver performance boosts in loading, as well as metrics such as Google Page Speed. This is something ...
user avatar
  • 401
2 votes
1 answer
138 views

Adjusting variables on change of status attribute of my Order Laravel model on the updated event in observer

I have an order model and a client model. A client has many orders, an order belongs to a single client. In the client model I keep track of how much money a client paid (...
user avatar
3 votes
2 answers
132 views

Archiving / Moving Data from one database server to another database server

I am working on an SMS marketing project based on Yii2 Framework (PHP 7.3 & MariaDb (innodb engine)) where we have to move the logs from different tables to the archive db, which is total a ...
user avatar
3 votes
2 answers
303 views

To-do app API made with Slim 3

I have put together the back-end (API) with the Slim framework (v3) and MySQL. In index.php I have: ...
user avatar
2 votes
1 answer
81 views

Scrape multiple twitch IRC chats

I've always struggled to create and sustainable, organizated, clean code. I tried to use a Factory method and it's working better now that I created another class. I know I should write documentation,...
user avatar
  • 45
6 votes
2 answers
423 views

Usage of Factory pattern for maintaing bookshelf having books, magazine and notes

I have tried to achieve the following task using Factory Pattern with php-7.0. Define the classes and their methods (including parameters and return types) for a system that consist of a bookshelf, ...
user avatar
2 votes
2 answers
337 views

Address class in PHP 7.4 with types

About this exercise I found out there is a form of strict types in PHP 7.4, so I freshened up my PHP coding with this simple Address class. I did not use PHP since ...
user avatar
4 votes
2 answers
4k views

PHP loop to generate an HTML form for the days in the coming week

There are two arrays, $states and $weekdays. I want to loop through them to create a form, an HTML table, or possibly some other ...
user avatar
0 votes
1 answer
72 views

Automated Tweet of new inbound Enquiries in PHP7 (Laravel 5.2)

Background. A User can submit an enquiry via a form hosted on a clients website, these are pushed onto a queue, and then taken off the queue for processing, to process several different parts of the ...
user avatar
  • 329