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
17 questions
2
votes
1
answer
158
views
PHP Class to render HTML div styled tables version 2
After my previous question I made several changes and came up with this. Remember: I wrote this for PHP 7.0.33. I'm aware I should upgrade, save the advice :)
...
2
votes
1
answer
569
views
PHP Class to render HTML div styled tables v1
This class aims to render an HTML compliant div styled table. I added a help() method that provides usage and styling in a more user-friendly way. Besides the ...
2
votes
1
answer
127
views
HTML form Class
After my previous question I revised the code to the code below. I am using PHP 7.0.33 and tried to accomplish PSR-12 as much as I could. In "condensed usage" in the docblock you can find a ...
3
votes
2
answers
748
views
PHP HTML form Class - so far so good?
I am writing this class to render HTML forms. It is working as expected, so far. There are many things to be done yet (including testing). Is it ok to keep this way?
...
2
votes
1
answer
131
views
PHP Pagination class (Clase para paginar resultados)
This is my first question in Code Review. I apologize in advance for using Spanish (my native language). I thought there was a spanish version of Code Review.
This class is meant for pagination. It ...
3
votes
1
answer
350
views
Applying the Strategy pattern for payment methods
The strategy pattern is applied in the code below in the payment separation solution. Please evaluate if it is well done according to standards. I would be very grateful for suggestions.
...
2
votes
0
answers
78
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 ...
-1
votes
1
answer
66
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 ...
1
vote
1
answer
81
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 ...
3
votes
1
answer
573
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 (...
3
votes
2
answers
429
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 ...
3
votes
2
answers
453
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:
...
3
votes
1
answer
170
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,...
6
votes
2
answers
514
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 version 7.0.
Define the classes and their methods (including parameters and return types) for a system that consist of a ...
2
votes
2
answers
601
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 ...