Skip to main content

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

0 votes
1 answer
111 views

PHP Class to render HTML div styled tables v2 [reviewed by me]

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 :) ...
julio's user avatar
  • 199
2 votes
1 answer
529 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 ...
julio's user avatar
  • 199
2 votes
1 answer
107 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 ...
julio's user avatar
  • 199
3 votes
2 answers
701 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? ...
julio's user avatar
  • 199
2 votes
1 answer
107 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 ...
julio's user avatar
  • 199
3 votes
1 answer
326 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. ...
Łukasz Luq's user avatar
2 votes
0 answers
60 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
41 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 ...
Jonathan Clark's user avatar
1 vote
1 answer
69 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 ...
Bagseye's user avatar
  • 401
3 votes
1 answer
554 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 (...
Bogdan Ta's user avatar
3 votes
2 answers
372 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 ...
Muhammad Omer Aslam's user avatar
3 votes
2 answers
420 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: ...
Razvan Zamfir's user avatar
3 votes
1 answer
134 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,...
hamon's user avatar
  • 55
6 votes
2 answers
503 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 ...
ashofphoenix's user avatar
2 votes
2 answers
545 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 ...
Vlastimil Burián's user avatar

15 30 50 per page