3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); ini_set('display_errors', 'On'); header("Content-Type: application/json; charset=utf-8", true); class shop { public $denominazione; public $indirizzo; public $civico; public $cap; public $tel; public $lat; public $lon; } $locale1 = new shop(); $locale1->denominazione = 'Husker Dù'; $locale1->indirizzo = 'Via dei Reti'; $locale1->civico = 22/24; $locale1->cap = 00185; $locale1->tel = 3289546693; $locale1->lat = 41.89932; $locale1->lon = 12.51777; $loadLocali = array($locale1); $res = $loadLocali; try{ if ( count($res) >=1){ echo json_encode($res); } else{ $error = json_last_error(); throw new Exception($error); } } catch (Exception $e) { echo 'We"re gonna have a problem here: ', $e->getMessage(), "\n"; var_dump($error === JSON_ERROR_UTF8); var_dump($error === JSON_ERROR_DEPTH); var_dump($error === JSON_ERROR_STATE_MISMATCH); } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.40.0100.08320.32
7.0.30.0230.04020.33
7.0.20.0300.08720.06
7.0.10.0170.08020.21
7.0.00.0000.05320.21
5.6.280.0030.07320.78
5.6.210.0100.06720.57
5.6.200.0170.07018.21
5.6.190.0030.04720.57
5.6.180.0070.05020.55
5.6.170.0270.08720.57
5.6.160.0070.05020.50
5.6.150.0070.08318.23
5.6.140.0100.05018.21
5.6.130.0170.07318.18
5.6.120.0100.08321.04
5.6.110.0100.08021.13
5.6.100.0070.08720.89
5.6.90.0030.04320.88
5.6.80.0100.08020.40
5.5.350.0230.08020.36
5.5.340.0070.06318.09
5.5.330.0070.06320.26
5.5.320.0100.04720.41
5.5.310.0270.07720.38
5.5.300.0000.04717.92
5.5.290.0000.06317.98
5.5.280.0000.06020.78
5.5.270.0070.07720.80
5.5.260.0100.07720.97
5.5.250.0070.08320.59
5.5.240.3700.03320.16

preferences:
149.42 ms | 989 KiB | 8 Q