3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'type1' => array( 'id' => 'w12', 'name' => 'John Doe', 'email' => 'john@example.com', 'fname' => 'john', 'phone' => '111', 'age' => '22' ), 'type2' => array( 'id' => 'w13', 'name' => 'Jane Doe', 'email' => 'jane@example.com', 'age' => '22', 'phone' => '111', 'fname' => 'dsd' ), ); $order = [ 'id' => null, 'name' => null, 'fname' => null, 'phone' => null, 'age' => null, 'email' => null ]; foreach ($array as $row) { $ordered[] = array_merge($order, $row); } var_dump($ordered);

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.60.0090.00918.30
8.3.50.0140.00418.20
8.3.40.0080.00818.84
8.3.30.0040.01118.59
8.3.20.0070.00319.04
8.3.10.0040.00423.65
8.3.00.0040.00420.68
8.2.180.0130.00318.26
8.2.170.0040.01122.96
8.2.160.0110.00422.13
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00317.79
8.2.120.0090.00026.35
8.2.110.0000.00920.52
8.2.100.0000.01217.91
8.2.90.0040.00417.75
8.2.80.0080.00017.97
8.2.70.0050.00318.05
8.2.60.0060.00318.09
8.2.50.0080.00018.10
8.2.40.0050.00319.42
8.2.30.0000.01019.19
8.2.20.0040.00418.04
8.2.10.0040.00418.12
8.2.00.0030.00617.76
8.1.280.0000.01825.92
8.1.270.0080.00018.92
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00723.83
8.1.230.0060.00617.48
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0090.00017.23
8.1.190.0000.00917.35
8.1.180.0040.00418.10
8.1.170.0080.00018.39
8.1.160.0000.00718.89
8.1.150.0040.00418.89
8.1.140.0040.00422.14
8.1.130.0070.00020.31
8.1.120.0000.00717.44
8.1.110.0050.00217.35
8.1.100.0000.00817.35
8.1.90.0070.00017.44
8.1.80.0000.00717.45
8.1.70.0030.00617.47
8.1.60.0000.00817.47
8.1.50.0040.00417.48
8.1.40.0040.00417.50
8.1.30.0000.00817.60
8.1.20.0040.00417.62
8.1.10.0080.00017.31
8.1.00.0030.00617.36
8.0.300.0000.00818.77
8.0.290.0030.00616.63
8.0.280.0070.00018.46
8.0.270.0070.00017.17
8.0.260.0060.00018.32
8.0.250.0020.00516.93
8.0.240.0000.00716.98
8.0.230.0000.00716.80
8.0.220.0070.00016.94
8.0.210.0030.00316.95
8.0.200.0030.00316.95
8.0.190.0000.00816.95
8.0.180.0040.00416.78
8.0.170.0040.00416.92
8.0.160.0040.00416.88
8.0.150.0040.00416.82
8.0.140.0050.00316.84
8.0.130.0030.00313.33
8.0.120.0000.00816.74
8.0.110.0040.00416.72
8.0.100.0040.00416.79
8.0.90.0040.00416.84
8.0.80.0050.01116.87
8.0.70.0080.00016.91
8.0.60.0030.00616.70
8.0.50.0000.00916.79
8.0.30.0100.00817.01
8.0.20.0140.00617.40
8.0.10.0050.00216.90
8.0.00.0130.00516.82
7.4.330.0000.00515.55
7.4.320.0070.00016.56
7.4.300.0040.00416.40
7.4.290.0070.00016.49
7.4.280.0000.00816.61
7.4.270.0070.00316.47
7.4.260.0040.00416.54
7.4.250.0000.00716.59
7.4.240.0000.00716.46
7.4.230.0030.00316.69
7.4.220.0000.00816.71
7.4.210.0100.00716.50
7.4.200.0070.00016.53
7.4.160.0050.01216.45
7.4.140.0110.01017.86
7.4.130.0130.00616.40
7.4.120.0140.00716.51
7.4.110.0090.01216.59
7.4.100.0030.01616.60
7.4.90.0120.00616.55
7.4.80.0070.01019.39
7.4.70.0140.01016.50
7.4.60.0140.00716.48
7.4.50.0070.01016.39
7.4.40.0140.00616.48
7.4.10.0090.01014.84
7.4.00.0050.01214.95
7.3.330.0050.00013.01
7.3.320.0030.00313.19
7.3.310.0030.00616.21
7.3.300.0030.00316.21
7.3.290.0030.00316.28
7.3.280.0100.00916.27
7.3.260.0110.00616.41
7.3.240.0120.00716.28
7.3.230.0060.01216.20
7.3.210.0070.01116.35
7.3.200.0110.00616.47
7.3.190.0100.00716.22
7.3.180.0090.01316.38
7.3.170.0040.01416.27
7.3.160.0070.01016.30
7.3.130.0090.01014.78
7.3.120.0090.01014.75
7.3.110.0100.00814.72
7.3.100.0070.00614.69
7.3.90.0070.00814.67
7.3.80.0030.01014.93
7.3.70.0030.01014.78
7.3.60.0030.01014.68
7.3.50.0030.01114.86
7.3.40.0060.00514.66
7.3.30.0060.00814.75
7.3.20.0090.00616.68
7.3.10.0050.00916.64
7.3.00.0090.00616.73
7.2.330.0160.00316.71
7.2.320.0170.01916.37
7.2.310.0070.01116.69
7.2.300.0030.02016.70
7.2.290.0120.00816.72
7.2.260.0040.01614.81
7.2.250.0030.01414.99
7.2.240.0090.00914.93
7.2.230.0050.01115.11
7.2.220.0080.01014.80
7.2.210.0030.01014.94
7.2.200.0060.00914.84
7.2.190.0030.01214.96
7.2.180.0050.01015.05
7.2.170.0090.00514.93
7.2.160.0050.01014.79
7.2.150.0080.00716.76
7.2.140.0050.00816.86
7.2.130.0060.00916.92
7.2.120.0050.00916.85
7.2.110.0050.00816.74
7.2.100.0040.01016.85
7.2.90.0040.01216.87
7.2.80.0070.00916.69
7.2.70.0050.01016.82
7.2.60.0020.01416.68
7.2.50.0080.00816.81
7.2.40.0020.00816.72
7.2.30.0070.00916.97
7.2.20.0080.00716.81
7.2.10.0090.00616.86
7.2.00.0080.00816.93
7.1.330.0080.00815.72
7.1.320.0030.01115.78
7.1.310.0080.00515.93
7.1.300.0070.00515.66
7.1.290.0070.00615.60
7.1.280.0050.00915.57
7.1.270.0070.00715.63
7.1.260.0050.00415.62
7.1.250.0020.01315.60
7.1.240.0050.00715.74
7.1.230.0010.01315.81
7.1.220.0060.00915.48
7.1.210.0050.00615.65
7.1.200.0070.00415.61
7.1.190.0050.00615.59
7.1.180.0040.01115.71
7.1.170.0030.01015.66
7.1.160.0050.00715.74
7.1.150.0050.00815.53
7.1.140.0070.00615.86
7.1.130.0040.01115.60
7.1.120.0050.01015.74
7.1.110.0050.00915.87
7.1.100.0060.00515.88
7.1.90.0040.00615.91
7.1.80.0050.00915.61
7.1.70.0090.00415.71
7.1.60.0000.01315.87
7.1.50.0030.01015.78
7.1.40.0070.00715.78
7.1.30.0050.00915.70
7.1.20.0040.00715.64
7.1.10.0000.01115.62
7.1.00.0090.00715.68
7.0.330.0050.00815.43
7.0.320.0050.00715.48
7.0.310.0060.00515.37
7.0.300.0070.00715.34
7.0.290.0030.00915.21
7.0.280.0110.00515.33
7.0.270.0090.00515.41
7.0.260.0060.00915.43
7.0.250.0050.00815.35
7.0.240.0040.01115.35
7.0.230.0090.00715.32
7.0.220.0060.00615.51
7.0.210.0070.00515.33
7.0.200.0020.01215.36
7.0.190.0030.01015.41
7.0.180.0050.00815.17
7.0.170.0030.01015.40
7.0.160.0060.00615.43
7.0.150.0100.00315.30
7.0.140.0080.00315.50
7.0.130.0040.00715.49
7.0.120.0050.00515.43
7.0.110.0020.01015.33
7.0.100.0060.00815.26
7.0.90.0050.00815.40
7.0.80.0070.00515.42
7.0.70.0090.00315.32
7.0.60.0050.00715.49
7.0.50.0080.00315.55
7.0.40.0020.00913.44
7.0.30.0050.00513.45
7.0.20.0040.00813.43
7.0.10.0060.00813.36
7.0.00.0090.00513.33
5.6.400.0110.00314.05
5.6.390.0050.01014.50
5.6.380.0030.00914.49
5.6.370.0040.01114.51
5.6.360.0060.00814.15
5.6.350.0070.00614.49
5.6.340.0060.00914.39
5.6.330.0050.01114.52
5.6.320.0070.00714.65
5.6.310.0030.00814.10
5.6.300.0080.00714.21
5.6.290.0060.00814.38
5.6.280.0070.01014.23
5.6.270.0010.01114.14
5.6.260.0030.00714.39
5.6.250.0050.01014.21
5.6.240.0080.00314.27
5.6.230.0050.01114.51
5.6.220.0020.01214.57
5.6.210.0000.01314.29
5.6.200.0070.00514.39
5.6.190.0080.00514.28
5.6.180.0060.00714.46
5.6.170.0060.01014.34
5.6.160.0050.00614.34
5.6.150.0030.01114.20
5.6.140.0070.00514.49
5.6.130.0020.01114.26
5.6.120.0040.01214.34
5.6.110.0070.01014.13
5.6.100.0030.01214.40
5.6.90.0050.01214.16
5.6.80.0080.00514.21
5.6.70.0080.00414.20
5.6.60.0070.00714.22
5.6.50.0070.00914.12
5.6.40.0070.00814.20
5.6.30.0050.01014.47
5.6.20.0030.01214.09
5.6.10.0030.00714.29
5.6.00.0030.01214.23

preferences:
50.94 ms | 401 KiB | 5 Q