3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'sucesso' => [ 'LAUDO_VISTORIA' => [ 0 => '0027', 2 => '30027', 3 => '0027', ], 'LAUDO' => [ 0 => '0027', 2 => '30027', 3 => '0027', ], 'DADOS_DO_VEICULO' => [ 0 => '0027', 1 => '30027', ] ], 'code' => 201 ]; function r_array_unique($array) { $hasChildren = false; foreach ($array as &$item) { if (is_array($item)) { $hasChildren = true; $item = r_array_unique($item); } } return $hasChildren ? $array : array_unique($array); } var_export(r_array_unique($array));

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.10.0120.00516.64
8.5.00.0100.01119.79
8.4.160.0110.01123.82
8.4.150.0020.00014.05
8.4.140.0140.01017.55
8.4.130.0130.00818.48
8.4.120.0120.00817.68
8.4.110.0120.00725.64
8.4.100.0140.00617.74
8.4.90.0060.00320.71
8.4.80.0030.00518.85
8.4.70.0060.00818.95
8.4.60.0110.00719.04
8.4.50.0120.00920.36
8.4.40.0100.01317.60
8.4.30.0040.00422.32
8.4.20.0080.01118.73
8.4.10.0090.00019.30
8.3.280.0130.00918.30
8.3.270.0120.00716.50
8.3.260.0090.00916.60
8.3.250.0040.00518.29
8.3.240.0120.00816.65
8.3.230.0140.00516.63
8.3.220.0080.00118.88
8.3.210.0130.00516.41
8.3.200.0120.00716.73
8.3.190.0040.00617.32
8.3.180.0120.00718.97
8.3.170.0100.01018.41
8.3.160.0090.00019.02
8.3.150.0120.00619.05
8.3.140.0070.01020.82
8.3.130.0060.00318.60
8.3.120.0030.00618.70
8.3.110.0060.01320.94
8.3.100.0000.01024.06
8.3.90.0040.00426.77
8.3.80.0060.00617.97
8.3.70.0000.01818.28
8.3.60.0160.00018.30
8.3.50.0120.00316.46
8.3.40.0140.00720.26
8.3.30.0170.00021.75
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0090.00916.72
8.2.280.0110.00918.16
8.2.270.0140.00421.96
8.2.260.0040.00416.60
8.2.250.0030.00616.42
8.2.240.0060.00317.10
8.2.230.0110.00022.58
8.2.220.0030.00637.54
8.2.210.0110.00726.77
8.2.200.0050.00316.50
8.2.190.0070.00718.42
8.2.180.0110.01116.63
8.2.170.0090.00619.01
8.2.160.0130.00322.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.36
8.2.110.0090.01322.13
8.2.100.0200.00721.13
8.2.90.0310.00318.89
8.2.80.0290.00318.74
8.2.70.0220.00918.72
8.2.60.0240.00318.55
8.2.50.0160.00418.55
8.2.40.0270.01218.69
8.2.30.0140.00418.62
8.2.20.0200.01018.65
8.2.10.0320.00419.21
8.2.00.0270.00319.00
8.1.330.0070.00316.21
8.1.320.0100.01117.96
8.1.310.0060.00316.56
8.1.300.0080.00018.45
8.1.290.0030.00730.84
8.1.280.0040.01925.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0270.00918.21
8.1.230.0300.01018.42
8.1.220.0260.01018.50
8.1.210.0190.01119.75
8.1.200.0300.00618.59
8.1.190.0240.00318.48
8.1.180.0170.01718.55
8.1.170.0100.01718.49
8.1.160.0260.00718.82
8.1.150.0300.00320.56
8.1.140.0230.00718.56
8.1.130.0200.00718.47
8.1.120.0240.00918.64
8.1.110.0120.00818.69
8.1.100.0130.00318.46
8.1.90.0190.00718.57
8.1.80.0170.00318.45
8.1.70.0130.00718.70
8.1.60.0150.00318.69
8.1.50.0300.00718.59
8.1.40.0170.00618.77
8.1.30.0160.00018.88
8.1.20.0250.00718.80
8.1.10.0190.00318.61
8.1.00.0040.01318.44
8.0.300.0130.00617.74
8.0.290.0300.00317.88
8.0.280.0070.00717.88
8.0.270.0280.00717.90
8.0.260.0160.00417.89
8.0.250.0140.00517.95
8.0.240.0150.00417.73
8.0.230.0140.00018.28
8.0.220.0120.00617.82
8.0.210.0150.00317.83
8.0.200.0160.00317.70
8.0.190.0150.00317.87
8.0.180.0100.00617.89
8.0.170.0080.00518.00
8.0.160.0130.00318.02
8.0.150.0110.00817.72
8.0.140.0130.00517.88
8.0.130.0150.00018.22
8.0.120.0130.00417.79
8.0.110.0110.00417.83
8.0.100.0200.00317.77
8.0.90.0250.00617.94
8.0.80.0170.00317.86
8.0.70.0160.00317.72
8.0.60.0130.00417.88
8.0.50.0160.00317.67
8.0.30.0110.00318.06
8.0.20.0320.00617.75
8.0.10.0310.00617.88

preferences:
36 ms | 403 KiB | 5 Q