3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA [ {"structure": {"latitude": 50, "longitude": 1, "nom": "ACME"}}, {"structure": {"latitude": 51, "longitude": 2, "nom": "Symfony"}} ] DATA; $signalements = json_decode($data); $markers = []; foreach ($signalements as $signalement) { $markers[] = [ 'position' => [$signalement->structure->latitude, $signalement->structure->longitude], 'title' => $signalement->structure->nom, ]; } print_r($markers); print(PHP_EOL.PHP_EOL); $markersWithArrayMap = array_map(function($value) { return [ 'position' => [$value->structure->latitude, $value->structure->longitude], 'title' => $value->structure->nom, ]; }, $signalements); print_r($markersWithArrayMap);

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)
8.5.30.0140.00418.15
8.5.20.0080.01220.32
8.5.10.0100.00716.77
8.5.00.0150.00822.97
8.4.180.0140.00819.75
8.4.170.0120.00823.66
8.4.160.0140.00923.02
8.4.150.0090.00416.90
8.4.140.0130.01217.64
8.4.130.0360.01217.85
8.4.120.0410.01117.49
8.4.110.0400.01217.32
8.4.100.0380.01217.76
8.4.90.0350.01617.72
8.4.80.0400.01117.29
8.4.70.0410.01317.51
8.4.60.0440.00817.39
8.4.50.0420.01017.55
8.4.40.0430.01017.48
8.4.30.0480.00917.41
8.4.20.0400.01517.79
8.4.10.0470.00617.54
8.3.300.0130.00819.07
8.3.290.0130.00718.48
8.3.280.0100.00918.28
8.3.270.0380.00916.51
8.3.260.0320.01616.32
8.3.250.0360.01116.57
8.3.240.0340.01116.41
8.3.230.0360.01316.48
8.3.220.0410.00816.43
8.3.210.0420.00916.50
8.3.200.0400.01116.25
8.3.190.0390.01116.52
8.3.180.0390.01216.48
8.3.170.0420.00816.75
8.3.160.0330.01416.67
8.3.150.0390.01016.61
8.3.140.0350.01216.78
8.3.130.0430.00816.53
8.3.120.0400.00616.63
8.3.110.0310.01116.77
8.3.100.0450.00816.66
8.3.90.0490.00816.77
8.3.80.0430.01216.36
8.3.70.0410.01416.39
8.3.60.0360.01216.18
8.3.50.0440.00916.67
8.3.40.0430.00917.51
8.3.30.0300.01117.49
8.3.20.0340.00917.62
8.3.10.0390.00817.51
8.3.00.0200.00717.61
8.2.300.0100.01018.11
8.2.290.0310.01016.43
8.2.280.0320.00916.45
8.2.270.0330.01216.65
8.2.260.0330.01016.39
8.2.250.0360.01216.59
8.2.240.0370.00716.54
8.2.230.0330.00616.45
8.2.220.0340.00816.19
8.2.210.0270.01216.27
8.2.200.0320.01016.04
8.2.190.0280.01516.23
8.2.180.0360.00816.30
8.2.170.0340.00817.60
8.2.160.0340.01017.67
8.2.150.0350.00817.22
8.2.140.0380.01017.11
8.2.130.0330.01217.21
8.2.120.0380.00717.20
8.2.110.0330.00917.37
8.2.100.0340.01217.35
8.2.90.0350.01517.52
8.2.80.0390.00917.33
8.2.70.0350.00717.55
8.2.60.0440.00817.29
8.2.50.0340.01117.41
8.2.40.0340.00717.45
8.2.30.0260.01317.75
8.2.20.0290.01117.53
8.2.10.0330.00817.43
8.2.00.0310.00917.38
8.1.340.0110.00917.43

preferences:
50.78 ms | 906 KiB | 5 Q