3v4l.org

run code in 300+ PHP versions simultaneously
<?php $initialArray = [ 0 => [ 'id'=>1, 'name'=>'Adam', 'value'=>150, ], 1=>[ 'id'=>2, 'name'=>'Bob', 'value'=>120, ], 2=>[ 'id'=>3, 'name'=>'Charlie', 'value'=>175, ], ]; $arrayPrepped = array(); foreach ($initialArray as $part) { $arrayPrepped[$part['name']] = $part['value']; } print_r($arrayPrepped);

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.4.130.0150.00519.53
8.4.120.0120.00720.41
8.4.110.0090.01122.57
8.4.100.0160.00417.74
8.4.90.0130.00418.78
8.4.80.0140.00619.41
8.4.70.0070.00517.46
8.4.60.0050.00518.71
8.4.50.0120.00817.47
8.4.40.0100.01019.56
8.4.30.0060.01319.14
8.4.20.0030.01417.59
8.4.10.0100.00017.40
8.3.260.0120.00816.85
8.3.250.0120.00718.80
8.3.240.0050.00416.33
8.3.230.0140.00516.54
8.3.220.0090.00717.05
8.3.210.0090.01016.72
8.3.200.0050.00416.48
8.3.190.0110.00817.00
8.3.180.0150.00416.71
8.3.170.0070.00017.21
8.3.160.0040.00418.62
8.3.150.0150.00320.71
8.3.140.0060.00316.69
8.3.130.0070.00016.43
8.3.120.0000.01118.90
8.3.110.0130.00620.94
8.3.100.0160.00424.06
8.3.90.0040.00426.77
8.3.80.0090.00017.97
8.3.70.0130.01018.30
8.3.60.0090.00616.50
8.3.50.0050.01122.11
8.3.40.0160.00318.63
8.3.30.0040.01118.86
8.3.20.0070.00020.16
8.3.10.0030.00520.21
8.3.00.0040.00423.48
8.2.290.0090.00320.71
8.2.280.0040.00418.19
8.2.270.0050.00317.04
8.2.260.0080.00016.54
8.2.250.0060.00316.58
8.2.240.0060.00318.84
8.2.230.0040.00422.58
8.2.220.0000.01137.54
8.2.210.0000.00826.77
8.2.200.0000.00918.41
8.2.190.0090.00916.63
8.2.180.0100.00718.38
8.2.170.0100.00722.96
8.2.160.0140.00020.38
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0140.00321.04
8.2.110.0030.00721.06
8.2.100.0060.00617.91
8.2.90.0040.00419.31
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0000.00918.05
8.2.50.0050.00318.10
8.2.40.0030.00620.42
8.2.30.0050.00320.32
8.2.20.0000.00718.16
8.2.10.0040.00418.17
8.2.00.0040.00418.40
8.1.330.0100.00821.88
8.1.320.0110.00315.97
8.1.310.0120.00616.75
8.1.300.0090.00916.82
8.1.290.0070.00430.84
8.1.280.0110.00425.92
8.1.270.0000.00823.96
8.1.260.0000.00826.35
8.1.250.0050.00528.09
8.1.240.0090.00022.03
8.1.230.0080.00420.88
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0090.00017.35
8.1.180.0000.00718.10
8.1.170.0000.00818.57
8.1.160.0040.00418.93
8.1.150.0030.00320.32
8.1.140.0070.00019.55
8.1.130.0000.00717.40
8.1.120.0050.00217.42
8.1.110.0100.00017.42
8.1.100.0040.00417.38
8.1.90.0040.00417.40
8.1.80.0040.00417.42
8.1.70.0040.00417.44
8.1.60.0000.00917.58
8.1.50.0000.00817.40
8.1.40.0030.00617.40
8.1.30.0040.00417.47
8.1.20.0030.00517.66
8.1.10.0030.00617.52
8.1.00.0090.00317.30
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0000.00718.43
8.0.270.0030.00317.16
8.0.260.0030.00316.81
8.0.250.0030.00516.97
8.0.240.0030.00316.93
8.0.230.0080.00416.96
8.0.220.0060.00016.91
8.0.210.0040.00416.90
8.0.200.0030.00316.93
8.0.190.0000.00717.01
8.0.180.0040.00416.91
8.0.170.0040.00416.96
8.0.160.0000.00716.98
8.0.150.0030.00316.80
8.0.140.0000.00716.77
8.0.130.0000.00613.32
8.0.120.0040.00416.90
8.0.110.0030.00316.93
8.0.100.0030.00516.88
8.0.90.0040.00416.75
8.0.80.0040.01616.89
8.0.70.0000.00816.89
8.0.60.0070.00016.90
8.0.50.0040.00416.77
8.0.30.0080.01017.12
8.0.20.0100.00917.40
8.0.10.0040.00416.84
8.0.00.0130.00716.74
7.4.330.0050.00015.55
7.4.320.0070.00016.63
7.4.300.0000.00616.59
7.4.290.0080.00016.50
7.4.280.0000.00816.47
7.4.270.0030.00316.51
7.4.260.0050.00216.47
7.4.250.0030.00316.45
7.4.240.0040.00416.55
7.4.230.0000.00716.33
7.4.220.0050.01816.45
7.4.210.0070.01116.63
7.4.200.0070.00016.40
7.4.160.0120.00516.40
7.4.150.0130.00317.40
7.4.140.0110.00917.86
7.4.130.0100.00816.39
7.4.120.0100.01016.45
7.4.110.0160.00716.40
7.4.100.0090.01516.43
7.4.90.0120.01216.58
7.4.80.0130.00319.39
7.4.70.0060.00916.56
7.4.60.0100.00716.71
7.4.50.0080.00616.40
7.4.40.0090.00616.71
7.4.30.0090.01516.50
7.4.00.0070.00715.03
7.3.330.0020.00613.17
7.3.320.0000.00513.23
7.3.310.0000.00716.29
7.3.300.0000.00716.32
7.3.290.0030.00316.30
7.3.280.0100.00916.31
7.3.270.0070.01117.40
7.3.260.0150.00816.47
7.3.250.0130.00416.39
7.3.240.0050.01116.29
7.3.230.0080.00816.59
7.3.210.0130.01016.30
7.3.200.0090.00916.25
7.3.190.0050.01616.42
7.3.180.0110.00516.37
7.3.170.0070.01016.20
7.3.160.0140.00316.27
7.3.120.0090.00914.57
7.3.110.0060.01214.93
7.3.100.0100.00614.91
7.3.90.0110.00714.75
7.3.80.0040.01114.55
7.3.70.0040.01214.59
7.3.60.0000.00914.92
7.3.50.0110.00314.60
7.3.40.0030.00914.91
7.3.30.0000.01514.69
7.3.20.0060.00316.77
7.3.10.0000.01216.51
7.3.00.0130.00616.76
7.2.330.0100.01316.43
7.2.320.0090.00916.55
7.2.310.0210.00316.49
7.2.300.0160.00316.80
7.2.290.0030.01216.74
7.2.240.0110.00615.02
7.2.230.0060.00914.97
7.2.220.0030.01414.96
7.2.210.0030.01014.98
7.2.200.0100.00615.01
7.2.190.0070.00715.08
7.2.180.0030.00615.18
7.2.170.0100.00315.18
7.2.160.0000.01514.84
7.2.150.0030.01016.96
7.2.140.0060.01016.99
7.2.130.0100.01016.97
7.2.120.0090.00616.74
7.2.110.0090.00916.88
7.2.100.0040.00817.07
7.2.90.0100.00717.13
7.2.80.0040.01117.09
7.2.70.0040.01117.14
7.2.60.0070.01016.90
7.2.50.0090.00616.94
7.2.40.0090.00616.98
7.2.30.0070.00317.00
7.2.20.0100.00316.70
7.2.10.0080.00817.12
7.2.00.0090.00616.96
7.1.330.0040.01416.04
7.1.320.0030.00915.58
7.1.310.0030.00715.89
7.1.300.0090.00615.56
7.1.290.0040.00815.61
7.1.280.0090.00615.85
7.1.270.0060.00616.00
7.1.260.0100.00615.89
7.1.250.0090.00015.89
7.1.70.0040.00417.00
7.1.60.0070.00717.41
7.1.30.0230.05738.36
7.1.20.0200.07038.18
7.1.10.0270.07022.21
7.1.00.0030.07722.43
7.0.200.0030.01316.73
7.0.170.0100.06721.85
7.0.160.0130.06721.80
7.0.150.0000.09021.85
7.0.140.0070.07721.89
7.0.130.0100.05721.87
7.0.120.0130.06721.96
7.0.110.0030.06021.83
7.0.100.0100.05321.69
7.0.90.0130.06321.98
7.0.80.0070.08321.84
7.0.70.0070.06021.80
7.0.60.0070.07321.97
7.0.50.0170.05722.00
7.0.40.0200.06021.84
7.0.30.0070.07021.84
7.0.20.0070.06721.84
7.0.10.0170.05721.83
7.0.00.0100.06721.90

preferences:
29.08 ms | 403 KiB | 5 Q