3v4l.org

run code in 300+ PHP versions simultaneously
<?php $schema = Array( Array("prestation_1" => 123, "prestataire_1" => 321, "prestation_2" => 456, "prestataire_2" => 654), Array("prestation_1" => 123, "prestataire_1" => 321, "prestation_2" => 456, "prestataire_2" => 654), Array("prestation_1" => 123, "prestataire_1" => 3241, "prestation_2" => 4956, "prestataire_2" => 654), Array("prestation_1" => 123, "prestataire_1" => 321, "prestation_2" => 456, "prestataire_2" => 654) ); function check( $array) { $array=array_values($array); $k=0; for($i=0;$i<count($array);$i++) { if(count($array)-1 > $i) { if($array[$i] == $array[$i+1]) $k=0; else $k=1; } } if($k == 0) return $array[0]; else return array(); } //print_r(check($schema)) ; $arr = array_unique($schema); print_r($arr);

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.0150.00618.40
8.3.50.0120.00521.27
8.3.40.0070.01118.58
8.3.30.0100.00718.92
8.3.20.0070.00020.16
8.3.10.0070.00022.00
8.3.00.0040.00422.53
8.2.180.0080.00816.61
8.2.170.0210.00022.96
8.2.160.0060.00920.43
8.2.150.0000.00824.18
8.2.140.0030.00724.66
8.2.130.0120.00626.16
8.2.120.0000.00719.30
8.2.110.0030.00619.14
8.2.100.0060.00617.72
8.2.90.0020.00519.05
8.2.80.0030.00619.23
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0000.00918.09
8.2.30.0030.00517.94
8.2.20.0070.00017.67
8.2.10.0040.00417.69
8.2.00.0000.00717.58
8.1.280.0120.00925.92
8.1.270.0080.00020.27
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00319.15
8.1.230.0000.01120.39
8.1.220.0070.00017.79
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0060.00317.39
8.1.180.0050.00318.64
8.1.170.0060.00318.64
8.1.160.0040.00422.08
8.1.150.0040.00418.53
8.1.140.0000.00717.28
8.1.130.0000.00817.72
8.1.120.0000.00717.32
8.1.110.0050.00317.39
8.1.100.0000.00817.29
8.1.90.0000.00717.35
8.1.80.0040.00417.47
8.1.70.0070.00017.32
8.1.60.0030.00617.59
8.1.50.0030.00617.41
8.1.40.0000.00817.34
8.1.30.0040.00417.57
8.1.20.0000.00817.60
8.1.10.0040.00417.48
8.1.00.0000.00717.39
8.0.300.0040.00418.77
8.0.290.0070.00017.04
8.0.280.0040.00418.44
8.0.270.0030.00317.12
8.0.260.0040.00416.84
8.0.250.0030.00316.89
8.0.240.0000.00716.96
8.0.230.0030.00316.99
8.0.220.0030.00316.89
8.0.210.0070.00016.89
8.0.200.0000.00616.98
8.0.190.0030.00516.87
8.0.180.0000.00816.96
8.0.170.0000.00716.93
8.0.160.0000.00816.86
8.0.150.0040.00416.86
8.0.140.0000.00716.77
8.0.130.0030.00313.37
8.0.120.0000.00716.89
8.0.110.0000.00716.83
8.0.100.0040.00416.81
8.0.90.0030.00416.92
8.0.80.0090.00616.90
8.0.70.0000.00716.90
8.0.60.0000.00716.81
8.0.50.0040.00416.81
8.0.30.0100.00917.00
8.0.20.0120.00617.40
8.0.10.0040.00417.01
8.0.00.0110.00916.86
7.4.330.0000.00515.00
7.4.320.0060.00016.58
7.4.300.0030.00316.50
7.4.290.0070.00016.56
7.4.280.0030.00316.46
7.4.270.0030.00316.46
7.4.260.0000.00716.45
7.4.250.0000.00716.51
7.4.240.0020.00516.50
7.4.230.0000.00716.62
7.4.220.0120.00916.59
7.4.210.0080.00716.46
7.4.200.0030.00316.33
7.4.190.0070.00016.62
7.4.160.0080.00816.43
7.4.150.0170.00017.40
7.4.140.0140.00817.86
7.4.130.0120.00516.45
7.4.120.0090.00916.40
7.4.110.0070.01016.46
7.4.100.0160.00916.39
7.4.90.0060.01216.46
7.4.80.0000.02519.39
7.4.70.0080.00816.27
7.4.60.0070.01016.34
7.4.50.0030.00316.50
7.4.40.0100.00722.77
7.4.30.0140.00316.59
7.4.00.0100.00414.74
7.3.330.0000.00513.24
7.3.320.0050.00013.13
7.3.310.0070.00016.28
7.3.300.0050.00216.19
7.3.290.0060.01016.17
7.3.280.0080.00916.20
7.3.270.0120.00917.40
7.3.260.0100.01016.26
7.3.250.0110.01016.26
7.3.240.0090.00916.23
7.3.230.0180.00316.39
7.3.210.0070.01116.30
7.3.200.0070.01519.39
7.3.190.0120.00616.54
7.3.180.0120.00916.23
7.3.170.0130.00616.58
7.3.160.0090.00616.43
7.3.120.0020.01414.59
7.3.110.0030.01314.60
7.3.100.0090.00914.72
7.3.90.0000.01314.93
7.3.80.0030.00614.61
7.3.70.0060.00314.51
7.3.60.0040.00714.80
7.3.50.0130.00014.56
7.3.40.0070.01014.61
7.3.30.0080.00414.75
7.3.20.0070.00716.71
7.3.10.0100.00016.34
7.3.00.0040.01016.40
7.2.330.0100.01316.29
7.2.320.0140.00816.69
7.2.310.0090.00916.52
7.2.300.0120.00616.68
7.2.290.0130.00916.49
7.2.250.0000.01015.15
7.2.240.0090.00914.59
7.2.230.0030.01014.63
7.2.220.0040.01114.69
7.2.210.0090.00914.72
7.2.200.0040.00714.97
7.2.190.0040.01114.78
7.2.180.0120.00614.83
7.2.170.0030.01214.92
7.2.160.0080.00814.54
7.2.150.0120.00316.74
7.2.140.0130.00316.83
7.2.130.0050.00916.76
7.2.120.0050.00816.45
7.2.110.0060.00816.55
7.2.100.0070.00516.77
7.2.90.0020.01216.76
7.2.80.0040.00716.73
7.2.70.0080.00516.90
7.2.60.0050.00616.74
7.2.50.0060.00916.54
7.2.40.0060.00616.79
7.2.30.0100.00316.91
7.2.20.0040.01016.56
7.2.10.0030.00916.76
7.2.00.0070.00917.52
7.1.330.0060.00615.64
7.1.320.0040.01115.77
7.1.310.0100.00015.85
7.1.300.0040.01415.48
7.1.290.0050.00815.31
7.1.280.0060.00615.53
7.1.270.0000.01315.68
7.1.260.0100.00315.70
7.1.250.0060.00815.69
7.1.240.0040.00715.62
7.1.230.0050.00615.76
7.1.220.0050.00715.78
7.1.210.0090.00615.72
7.1.200.0030.00915.71
7.1.190.0050.00715.62
7.1.180.0070.00815.54
7.1.170.0050.00515.50
7.1.160.0020.01015.64
7.1.150.0080.00315.75
7.1.140.0020.01215.53
7.1.130.0060.00715.60
7.1.120.0070.00815.71
7.1.110.0080.00515.74
7.1.100.0050.00716.42
7.1.90.0070.00815.83
7.1.80.0040.00715.65
7.1.70.0020.00815.99
7.1.60.0070.00917.13
7.1.50.0040.00816.09
7.1.40.0050.00815.64
7.1.30.0050.00815.61
7.1.20.0080.00415.60
7.1.10.0030.00815.86
7.1.00.0070.02118.00
7.0.330.0100.00615.19
7.0.320.0030.00815.09
7.0.310.0050.00615.27
7.0.300.0060.00515.19
7.0.290.0040.00815.32
7.0.280.0060.00915.40
7.0.270.0010.01115.34
7.0.260.0070.00915.21
7.0.250.0040.00615.26
7.0.240.0070.00715.42
7.0.230.0100.00115.41
7.0.220.0030.00815.35
7.0.210.0050.00815.46
7.0.200.0080.00415.72
7.0.190.0060.00715.43
7.0.180.0090.00415.42
7.0.170.0070.00715.36
7.0.160.0080.00415.25
7.0.150.0010.00815.34
7.0.140.0030.02817.50
7.0.130.0070.00515.11
7.0.120.0040.00615.33
7.0.110.0070.00315.48
7.0.100.0020.00715.31
7.0.90.0050.00715.39
7.0.80.0060.00315.10
7.0.70.0100.00215.25
7.0.60.0140.02416.92
7.0.50.0050.01816.26
7.0.40.0080.01715.63
7.0.30.0120.02415.65
7.0.20.0130.02915.62
7.0.10.0130.02815.70
7.0.00.0080.03115.65
5.6.400.0060.00314.39
5.6.390.0030.00613.88
5.6.380.0080.00314.14
5.6.370.0050.00614.05
5.6.360.0020.01414.30
5.6.350.0050.00514.12
5.6.340.0090.00314.31
5.6.330.0060.00714.54
5.6.320.0090.00314.08
5.6.310.0030.00914.24
5.6.300.0030.00714.32
5.6.290.0070.00714.09
5.6.280.0050.03016.49
5.6.270.0030.00814.27
5.6.260.0020.01214.14
5.6.250.0060.00514.31
5.6.240.0070.00714.20
5.6.230.0100.00314.15
5.6.220.0030.00714.28
5.6.210.0090.01816.38
5.6.200.0070.02115.53
5.6.190.0070.01916.28
5.6.180.1200.02216.30
5.6.170.0120.02216.32
5.6.160.0070.01916.30
5.6.150.0080.02415.54
5.6.140.0070.02815.59
5.6.130.0060.02215.58
5.6.120.0100.02716.45
5.6.110.0070.03116.49
5.6.100.0090.03116.54
5.6.90.0090.03316.57
5.6.80.0080.03016.21
5.6.70.0070.03216.23
5.6.60.0020.00814.09
5.6.50.0030.01214.11
5.6.40.0080.00614.13
5.6.30.0020.01014.20
5.6.20.0070.00514.04
5.6.10.0060.00414.11
5.6.00.0110.00114.14
5.5.380.0030.00812.47
5.5.370.0060.00612.69
5.5.360.0070.00312.69
5.5.350.0080.03115.14
5.5.340.0050.03414.49
5.5.330.0090.02715.25
5.5.320.0150.02815.21
5.5.310.0130.02315.31
5.5.300.0060.03014.36
5.5.290.0060.03114.45
5.5.280.0060.02115.41
5.5.270.0050.01715.30
5.5.260.0040.03515.24
5.5.250.0040.03215.24
5.5.240.0090.02315.04
5.5.230.0060.00512.57
5.5.220.0020.00912.55
5.5.210.0040.00512.42
5.5.200.0000.00712.64
5.5.190.0050.00712.48
5.5.180.0030.00812.62
5.5.170.0020.00912.50
5.5.160.0080.00512.56
5.5.150.0030.00612.55
5.5.140.0060.00512.58
5.5.130.0020.00712.51
5.5.120.0030.01012.51
5.5.110.0050.00512.46
5.5.100.0050.00512.60
5.5.90.0020.00812.56
5.5.80.0060.00412.71
5.5.70.0060.00312.49
5.5.60.0040.00712.40
5.5.50.0070.00612.67
5.5.40.0030.00812.52
5.5.30.0070.00312.49
5.5.20.0030.00812.49
5.5.10.0070.00512.62
5.5.00.0030.00812.51
5.4.450.0040.02914.20
5.4.440.0120.01814.27
5.4.430.0090.01914.23
5.4.420.0270.01914.06
5.4.410.0080.02114.15
5.4.400.0510.02113.98
5.4.390.0250.02813.91
5.4.380.0110.02214.01
5.4.370.0080.02313.94
5.4.360.0140.01613.92
5.4.350.0030.01711.68
5.4.340.0080.01511.68
5.4.330.0040.00511.55
5.4.320.0060.01611.88
5.4.310.0040.02011.84
5.4.300.0020.02211.89
5.4.290.0060.01511.92
5.4.280.0050.01911.87
5.4.270.0050.01911.82
5.4.260.0060.01711.80
5.4.250.0080.01813.95
5.4.240.0070.02013.99
5.4.230.0050.02013.94
5.4.220.0070.02713.95
5.4.210.0040.02113.98
5.4.200.0000.02613.96
5.4.190.0040.03013.91
5.4.180.0040.02214.06
5.4.170.0090.02013.93
5.4.160.0070.02013.91
5.4.150.0050.02014.00
5.4.140.0030.02113.14
5.4.130.0000.02413.24
5.4.120.0050.02013.17
5.4.110.0050.02113.23
5.4.100.0040.02113.13
5.4.90.0000.02913.17
5.4.80.0090.01813.24
5.4.70.0050.02013.34
5.4.60.0050.02113.24
5.4.50.0050.01913.18
5.4.40.0080.01913.21
5.4.30.0080.01913.21
5.4.20.0020.02313.15
5.4.10.0050.02813.20
5.4.00.0070.01712.97
5.3.290.0050.01611.94
5.3.280.0070.02012.57
5.3.270.0070.01912.50
5.3.260.0040.02112.56
5.3.250.0020.02412.54
5.3.240.0040.02012.54
5.3.230.0050.02112.56
5.3.220.0040.02312.55
5.3.210.0050.02012.52
5.3.200.0060.01912.55
5.3.190.0080.01812.55
5.3.180.0050.02112.57
5.3.170.0050.02112.55
5.3.160.0030.02112.55
5.3.150.0050.02112.55
5.3.140.0070.01612.55
5.3.130.0060.02812.55
5.3.120.0110.01712.54
5.3.110.0070.01912.52
5.3.100.0040.02112.42
5.3.90.0100.02412.37
5.3.80.0020.02212.36
5.3.70.0060.02112.31
5.3.60.0070.01912.40
5.3.50.0040.02212.26
5.3.40.0060.02612.35
5.3.30.0030.02112.36
5.3.20.0050.01812.20
5.3.10.0060.01712.24
5.3.00.0100.01412.22
5.2.170.0040.02411.06
5.2.160.0080.02111.01
5.2.150.0070.03211.00
5.2.140.0030.02311.05
5.2.130.0020.02311.03
5.2.120.0060.02110.95
5.2.110.0070.01811.11
5.2.100.0010.02611.01
5.2.90.0060.02010.99
5.2.80.0100.02511.03
5.2.70.0090.02111.04
5.2.60.0100.01811.01
5.2.50.0000.02611.01
5.2.40.0080.01710.99
5.2.30.0040.02211.02
5.2.20.0020.02310.97
5.2.10.0000.03110.86
5.2.00.0020.02410.80
5.1.60.0010.01910.48
5.1.50.0050.02010.45
5.1.40.0050.01710.49
5.1.30.0050.02010.60
5.1.20.0050.01810.54
5.1.10.0030.02010.52
5.1.00.0080.01710.51
5.0.50.0020.0189.73
5.0.40.0060.0139.64
5.0.30.0060.0209.56
5.0.20.0050.0159.55
5.0.10.0030.0159.53
5.0.00.0040.0229.56
4.4.90.0020.0138.90
4.4.80.0010.0138.90
4.4.70.0040.0118.90
4.4.60.0030.0118.90
4.4.50.0050.0098.90
4.4.40.0030.0178.90
4.4.30.0050.0098.90
4.4.20.0030.0158.90
4.4.10.0020.0138.90
4.4.00.0030.0158.90
4.3.110.0020.0138.90
4.3.100.0020.0138.90
4.3.90.0020.0138.90
4.3.80.0020.0208.90
4.3.70.0070.0088.90
4.3.60.0030.0168.90
4.3.50.0000.0168.90
4.3.40.0020.0178.90
4.3.30.0010.0138.90
4.3.20.0030.0128.90
4.3.10.0000.0198.90
4.3.00.0020.0138.65

preferences:
38.56 ms | 401 KiB | 5 Q