3v4l.org

run code in 300+ PHP versions simultaneously
<?php $links = [ [ 'type_id' => '1', 'url' => '' ], [ 'type_id' => '2', 'url' => '' ] ]; $types = [ [ 'id' => 1, 'value' => 'facebook' ], [ 'id' => 2, 'value' => 'twitter' ] ]; $data = [ 'primary' => [ 'address_details' => [], 'contact_details' => [], 'social_links' => array_map(function ($v) use ($links) { return $links[array_search($v, array_column($links, 'type_id'))]; }, array_column($types, 'id', 'value')) ] ]; print_r($data);

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.3.130.0060.00918.22
8.3.120.0030.00619.06
8.3.110.0030.00616.41
8.3.100.0030.00616.48
8.3.90.0000.00816.68
8.3.80.0030.00718.43
8.3.70.0070.00716.38
8.3.60.0150.00418.40
8.3.50.0080.00718.22
8.3.40.0110.01118.67
8.3.30.0120.00318.63
8.3.20.0000.00721.77
8.3.10.0040.00420.36
8.3.00.0050.00319.25
8.2.250.0050.00216.64
8.2.240.0060.00316.53
8.2.230.0030.00620.94
8.2.220.0040.00424.06
8.2.210.0040.01126.77
8.2.200.0060.00318.18
8.2.190.0090.00616.60
8.2.180.0140.00418.41
8.2.170.0130.00722.96
8.2.160.0140.00021.09
8.2.150.0070.00724.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.06
8.2.110.0030.00622.25
8.2.100.0040.00718.03
8.2.90.0040.00417.91
8.2.80.0060.00318.16
8.2.70.0030.00517.93
8.2.60.0030.00618.34
8.2.50.0040.00418.10
8.2.40.0080.00021.18
8.2.30.0030.00519.29
8.2.20.0080.00018.06
8.2.10.0040.00419.38
8.2.00.0080.00018.12
8.1.300.0160.00316.29
8.1.290.0030.00618.88
8.1.280.0070.01425.92
8.1.270.0040.00420.33
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00317.36
8.1.230.0080.00321.10
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0100.00017.48
8.1.190.0030.00517.22
8.1.180.0000.00818.10
8.1.170.0040.00418.53
8.1.160.0050.00318.77
8.1.150.0000.00718.89
8.1.140.0040.00420.38
8.1.130.0000.00720.27
8.1.120.0040.00417.36
8.1.110.0000.00717.53
8.1.100.0040.00417.50
8.1.90.0000.00717.50
8.1.80.0060.00317.42
8.1.70.0080.00017.49
8.1.60.0060.00317.48
8.1.50.0090.00317.55
8.1.40.0040.00417.45
8.1.30.0040.00417.50
8.1.20.0060.00317.56
8.1.10.0030.00617.54
8.1.00.0060.00317.50
8.0.300.0030.00319.95
8.0.290.0040.00416.75
8.0.280.0030.00318.50
8.0.270.0040.00416.82
8.0.260.0070.00018.32
8.0.250.0000.00716.89
8.0.240.0030.00316.84
8.0.230.0000.00816.92
8.0.220.0040.00416.89
8.0.210.0000.00716.91
8.0.200.0030.00316.86
8.0.190.0060.00316.93
8.0.180.0040.00416.84
8.0.170.0040.00416.93
8.0.160.0050.00316.82
8.0.150.0000.00816.91
8.0.140.0040.00416.81
8.0.130.0000.00513.31
8.0.120.0000.00816.86
8.0.110.0040.00416.84
8.0.100.0080.00016.76
8.0.90.0040.00416.85
8.0.80.0090.01316.88
8.0.70.0000.00716.91
8.0.60.0000.00716.77
8.0.50.0000.00716.95
8.0.30.0080.01116.96
8.0.20.0140.00517.14
8.0.10.0040.00416.97
8.0.00.0100.01016.95
7.4.330.0050.00015.55
7.4.320.0030.00316.47
7.4.300.0060.00016.57
7.4.290.0000.00616.54
7.4.280.0050.00216.54
7.4.270.0040.00416.61
7.4.260.0060.00016.56
7.4.250.0000.00716.55
7.4.240.0040.00416.50
7.4.230.0040.00416.58
7.4.220.0040.00416.49
7.4.210.0080.01016.61
7.4.200.0070.00016.35
7.4.160.0060.01116.52
7.4.140.0160.01117.86
7.4.130.0130.01216.65
7.4.120.0130.01016.61
7.4.110.0090.00916.26
7.4.100.0180.00616.42
7.4.90.0070.01016.33
7.4.80.0060.01019.39
7.4.70.0140.00416.44
7.4.60.0000.01616.38
7.4.50.0060.00616.38
7.4.40.0100.01316.47
7.4.00.0090.00714.78
7.3.330.0000.00613.16
7.3.320.0060.00013.16
7.3.310.0060.00316.35
7.3.300.0040.00416.34
7.3.290.0000.00716.19
7.3.280.0090.00816.25
7.3.260.0110.00916.43
7.3.240.0090.00916.45
7.3.230.0070.01016.58
7.3.210.0130.00316.51
7.3.200.0070.01416.65
7.3.190.0100.01316.67
7.3.180.0140.00716.61
7.3.170.0100.01316.59
7.3.160.0140.00716.49
7.3.120.0110.00714.82
7.3.110.0040.01414.85
7.3.100.0060.00914.54
7.3.90.0080.00314.73
7.3.80.0030.01014.97
7.3.70.0030.00914.68
7.3.60.0030.00814.55
7.3.50.0100.00314.71
7.3.40.0060.00614.77
7.3.30.0060.00714.85
7.3.20.0240.00415.77
7.3.10.0230.01215.46
7.3.00.0280.00615.71
7.2.330.0070.01016.66
7.2.320.0070.01416.75
7.2.310.0030.01616.40
7.2.300.0130.00916.75
7.2.290.0110.00616.74
7.2.250.0070.01115.21
7.2.240.0030.01715.08
7.2.230.0040.01515.14
7.2.220.0030.01214.80
7.2.210.0130.00315.13
7.2.200.0060.00614.81
7.2.190.0100.00714.93
7.2.180.0030.01014.81
7.2.170.0040.00715.18
7.2.150.0400.01014.74
7.2.140.0640.01014.96
7.2.130.0520.00314.65
7.2.120.0640.00615.03
7.2.110.0550.00615.03
7.2.100.0470.00315.01
7.2.90.0480.01015.00
7.2.80.0380.00314.91
7.2.70.0360.00714.83
7.2.60.0560.00315.10
7.2.50.0450.00315.01
7.2.40.0660.00714.96
7.2.30.0130.01314.76
7.2.20.0430.00614.82
7.2.10.0180.00615.15
7.2.00.0430.00015.01
7.1.330.0040.01115.88
7.1.320.0080.00815.68
7.1.310.0070.00715.66
7.1.300.0090.00415.57
7.1.290.0000.00815.75
7.1.280.0000.01015.52
7.1.270.0110.00315.40
7.1.260.0090.00315.71
7.1.250.0440.01313.79

preferences:
30.43 ms | 403 KiB | 5 Q