Benchmark array versus object

This benchmark tests the next functionalities:

  • Create a variable.
  • Then, it reads a simple value
  • And it adds to the list (the list is created every round)

And it is an example of the variables used

$array_numeric=[$hello,$second,$third];$array_not_numeric=['hello'=>$hello,'second'=>$second,'third'=>$third];$object_constructor=DummyClass('world',0,20.3);$object_no_constructor=new DummyClass2();
$object_no_constructor->hello='world';
$object_no_constructor->second=0;
$object_no_constructor->third=20.3;

We also test the use of…

Accessing a Mysql database using PHP and PdoOne

PdoOne is a library with two goals: performance and no dependency. This library consists of only 5 classes and a single interface.

This library also contains 3 different ways to work with the database.

Example of an invoice.

For our exercise, we will use it to insert and read an invoice. …

Example code of AutoLoadOne Library for PHP 5.6 and higher.

The library

The source code of the example

Why we need this library?

  • It is a high-performance library. It is optimized for speed and memory usage.
  • It doesn’t require a special configuration. It works with practically every project.
  • It doesn’t…

Jorge Castro

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store