3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=Array(Array("segments" => Array(1=>"Gcia de Auditoría Interna",0 => "Auditoria Interna 1"),"groups" => Array("estados" => "sp","cidade" => "sumpaulo")), Array("segments" => Array(2 => "Gerencia Recursos Humanos",1 => "Gcia Dpto Admin de Pers. y Rel. Laboral",0 => "SubGcia Administración de Personal"),"groups" => Array("estados" => "sp","cidade" => "")), Array("segments" => Array(2 => "Gerencia Recursos Humanos",1 => "Gcia Dpto Admin de Pers. y Rel. Laboral",0 => "SubGcia Administración de Personal"),"groups" => Array("estados" => "sp","cidade" => ""))); usort($arr,function($a,$b){ return strcmp(json_encode($a),json_encode($b)); }); $rst=array(); $cache=array(); while($p=array_shift($arr)) { if(empty($cache)) { $cache[]=$p; } elseif($cache[0]==$p) { $cache[]=$p; } else { $rst[]=array_merge($cache[0],array("total"=>count($cache))); $cache=array(); $cache[]=$p; } } if(!empty($cache)) { $rst[]=array_merge($cache[0],array("total"=>count($cache))); } print_r($rst);

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.0030.01716.63
8.3.50.0110.00921.90
8.3.40.0160.00018.97
8.3.30.0140.00318.80
8.3.20.0050.00320.31
8.3.10.0080.00023.53
8.3.00.0050.00322.51
8.2.180.0110.00725.92
8.2.170.0090.00622.96
8.2.160.0100.00722.31
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00722.16
8.2.110.0090.00019.25
8.2.100.0110.00017.97
8.2.90.0000.00920.59
8.2.80.0000.00820.48
8.2.70.0060.00317.75
8.2.60.0000.00917.91
8.2.50.0040.00718.07
8.2.40.0080.00018.16
8.2.30.0040.00418.13
8.2.20.0050.00217.78
8.2.10.0000.00819.47
8.2.00.0070.00017.74
8.1.280.0070.00725.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00822.62
8.1.230.0080.00320.95
8.1.220.0030.00617.74
8.1.210.0070.00018.87
8.1.200.0070.00417.22
8.1.190.0000.00817.51
8.1.180.0000.00918.10
8.1.170.0050.00318.53
8.1.160.0070.00022.03
8.1.150.0040.00418.63
8.1.140.0000.00717.39
8.1.130.0030.00317.76
8.1.120.0040.00417.36
8.1.110.0040.00417.44
8.1.100.0070.00017.36
8.1.90.0070.00317.45
8.1.80.0070.00017.52
8.1.70.0000.00717.42
8.1.60.0060.00317.60
8.1.50.0070.00017.41
8.1.40.0050.00317.49
8.1.30.0000.00817.45
8.1.20.0000.00817.54
8.1.10.0040.00417.51
8.1.00.0080.00017.52
8.0.300.0080.00019.92
8.0.290.0000.00717.18
8.0.280.0040.00418.36
8.0.270.0030.00616.87
8.0.260.0030.00316.84
8.0.250.0030.00317.05
8.0.240.0070.00016.99
8.0.230.0070.00017.00
8.0.220.0040.00416.82
8.0.210.0090.00016.97
8.0.200.0000.00616.81
8.0.190.0000.00716.98
8.0.180.0040.00416.84
8.0.170.0040.00417.00
8.0.160.0000.00816.84
8.0.150.0000.00816.75
8.0.140.0000.00716.74
8.0.130.0060.00013.23
8.0.120.0080.00016.74
8.0.110.0070.00016.80
8.0.100.0040.00416.75
8.0.90.0030.00316.84
8.0.80.0100.00716.84
8.0.70.0000.00716.92
8.0.60.0040.00416.92
8.0.50.0040.00416.77
8.0.30.0110.00717.06
8.0.20.0130.01117.40
8.0.10.0000.00717.02
8.0.00.0130.00616.68
7.4.330.0030.00315.00
7.4.320.0060.00016.50
7.4.300.0000.00716.42
7.4.290.0000.00716.50
7.4.280.0030.00316.54
7.4.270.0040.00416.64
7.4.260.0070.00016.63
7.4.250.0070.00016.55
7.4.240.0010.00616.55
7.4.230.0070.00016.67
7.4.220.0130.01216.71
7.4.210.0080.00916.49
7.4.200.0000.00716.41
7.4.190.0000.00716.36
7.4.160.0060.00916.44
7.4.150.0130.01317.40
7.4.140.0110.00917.86
7.4.130.0110.00716.66
7.4.120.0110.00616.50
7.4.110.0140.00316.54
7.4.100.0040.01316.69
7.4.90.0100.00716.30
7.4.80.0030.01619.39
7.4.70.0080.00816.59
7.4.60.0070.01116.33
7.4.50.0040.01016.37
7.4.40.0110.00618.44
7.4.30.0030.01416.10
7.4.20.0080.01016.20
7.4.10.0120.00416.25
7.4.00.0080.00615.68
7.3.330.0070.00013.21
7.3.320.0050.00013.28
7.3.310.0000.00716.36
7.3.300.0030.00316.24
7.3.290.0080.00816.30
7.3.280.0080.00916.30
7.3.270.0090.00917.40
7.3.260.0110.00816.46
7.3.250.0040.01316.39
7.3.240.0070.01016.53
7.3.230.0080.00916.39
7.3.210.0150.00316.38
7.3.200.0170.00019.39
7.3.190.0070.01416.35
7.3.180.0120.00516.34
7.3.170.0070.00716.13
7.3.160.0130.00316.32
7.3.150.0070.01016.51
7.3.140.0100.00616.39
7.3.130.0030.01216.13
7.3.120.0100.00315.53
7.3.110.0120.00916.09
7.3.100.0090.00616.35
7.3.90.0100.00616.35
7.3.80.0120.00416.56
7.3.70.0070.00916.47
7.3.60.0090.01216.28
7.3.50.0090.01216.38
7.3.40.0150.00616.22
7.3.30.0090.01316.19
7.3.20.0090.00616.38
7.3.10.0060.01016.18
7.3.00.0060.01116.40
7.2.330.0120.00616.88
7.2.320.0160.00716.85
7.2.310.0100.00616.32
7.2.300.0040.01416.30
7.2.290.0040.01216.54
7.2.280.0050.01116.29
7.2.270.0120.00816.34
7.2.260.0000.01516.54
7.2.250.0060.00916.45
7.2.240.0030.01216.48
7.2.230.0090.00616.41
7.2.220.0190.00016.45
7.2.210.0030.01316.44
7.2.200.0060.01216.62
7.2.190.0150.00616.29
7.2.180.0100.01316.54
7.2.170.0030.01916.61
7.2.160.0100.00616.32
7.2.150.0100.00716.58
7.2.140.0070.01016.47
7.2.130.0030.01316.70
7.2.120.0100.00716.63
7.2.110.0140.00416.53
7.2.100.0120.00416.42
7.2.90.0140.00916.27
7.2.80.0060.01516.41
7.2.70.0100.00616.16
7.2.60.0070.00916.55
7.2.50.0070.01016.59
7.2.40.0160.00716.77
7.2.30.0160.00316.25
7.2.20.0140.00716.45
7.2.10.0130.00516.51
7.2.00.0160.00916.18
7.1.330.0080.00815.54
7.1.320.0110.00415.45
7.1.310.0030.01715.63
7.1.300.0120.00915.51
7.1.290.0120.00915.52
7.1.280.0150.00615.32
7.1.270.0130.00615.46
7.1.260.0030.01315.51
7.1.250.0090.00915.63
7.1.240.0130.00915.31
7.1.230.0130.00315.49
7.1.220.0090.00615.32
7.1.210.0120.00415.33
7.1.200.0080.01215.52
7.1.190.0110.00415.30
7.1.180.0080.00815.40
7.1.170.0120.00315.57
7.1.160.0090.00615.58
7.1.150.0090.00915.49
7.1.140.0080.00715.31
7.1.130.0040.01115.48
7.1.120.0070.01115.43
7.1.110.0070.00715.58
7.1.100.0130.00315.52
7.1.90.0120.00615.54
7.1.80.0110.00515.51
7.1.70.0050.00716.42
7.1.60.0070.01016.17
7.1.50.0050.01016.23
7.1.40.0090.00515.41
7.1.30.0030.01215.54
7.1.20.0030.01215.43
7.1.10.0100.03119.01
7.1.00.0090.03818.96
7.0.330.0170.00015.23
7.0.320.0120.00415.02
7.0.310.0080.01215.21
7.0.300.0090.01315.13
7.0.290.0080.01115.17
7.0.280.0090.00915.20
7.0.270.0100.00715.04
7.0.260.0160.00415.11
7.0.250.0140.00315.05
7.0.240.0110.00815.19
7.0.230.0120.00915.05
7.0.220.0100.00715.24
7.0.210.0120.00815.19
7.0.200.0070.01115.91
7.0.190.0080.00815.27
7.0.180.0060.01215.19
7.0.170.0090.00915.29
7.0.160.0220.00615.20
7.0.150.0130.00414.98
7.0.140.0160.03118.71
7.0.130.0070.01015.20
7.0.120.0070.01415.17
7.0.110.0100.00715.14
7.0.100.0040.01415.13
7.0.90.0330.03017.56
7.0.80.0400.03517.49
7.0.70.0410.04017.53
7.0.60.0360.04317.69
7.0.50.0240.04617.73
7.0.40.0130.03217.62
7.0.30.0050.02817.58
7.0.20.0090.04217.64
7.0.10.0110.04617.65
7.0.00.0130.02817.46
5.6.400.0160.00515.85
5.6.390.0120.00915.93
5.6.380.0100.01016.03
5.6.370.0180.00715.67
5.6.360.0100.01716.10
5.6.350.0140.00716.05
5.6.340.0120.00915.70
5.6.330.0140.00815.95
5.6.320.0200.00615.60
5.6.310.0100.01815.73
5.6.300.0180.00415.71
5.6.290.0150.00715.98
5.6.280.0050.04618.24
5.6.270.0110.01015.77
5.6.260.0150.01515.82
5.6.250.0180.00315.96
5.6.240.0080.04718.19
5.6.230.0090.03118.05
5.6.220.0110.04518.19
5.6.210.0140.04118.15
5.6.200.0050.05018.52
5.6.190.0110.02618.37
5.6.180.0110.04118.30
5.6.170.0110.04518.34
5.6.160.0120.04618.45
5.6.150.0160.04418.38
5.6.140.0100.04818.45
5.6.130.0170.04018.50
5.6.120.0140.04818.54
5.6.110.0120.03418.50
5.6.100.0140.04118.49
5.6.90.0160.03918.29
5.6.80.0150.03118.17
5.6.70.0110.02218.07
5.6.60.0110.04018.11
5.6.50.0110.04218.23
5.6.40.0090.02918.02
5.6.30.0130.04318.07
5.6.20.0120.04118.04
5.6.10.0130.03917.99
5.6.00.0160.04118.11
5.5.380.0180.03818.07
5.5.370.0120.04318.24
5.5.360.0050.05218.05
5.5.350.0040.03718.09
5.5.340.0100.04818.35
5.5.330.0110.04618.33
5.5.320.0050.05118.26
5.5.310.0050.04718.40
5.5.300.0160.04418.32
5.5.290.0100.05318.22
5.5.280.0120.03318.40
5.5.270.0080.05218.26
5.5.260.0150.04218.42
5.5.250.0150.03818.17
5.5.240.0120.02417.99
5.5.230.0060.04918.01
5.5.220.0070.04518.02
5.5.210.0140.04318.01
5.5.200.0070.04218.00
5.5.190.0120.04418.10
5.5.180.0170.03217.99
5.5.170.0100.01315.83
5.5.160.0100.04518.02
5.5.150.0130.04218.06
5.5.140.0070.04517.98
5.5.130.0080.04917.95
5.5.120.0150.03818.04
5.5.110.0100.03817.89
5.5.100.0120.04817.98
5.5.90.0120.04517.89
5.5.80.0070.04217.91
5.5.70.0080.04517.73
5.5.60.0170.04217.88
5.5.50.0130.03517.88
5.5.40.0130.03917.78
5.5.30.0070.03117.84
5.5.20.0090.04417.99
5.5.10.0130.02617.81
5.5.00.0090.03017.93
5.4.450.0100.04615.98
5.4.440.0110.03115.99
5.4.430.0070.04515.97
5.4.420.0160.03816.08
5.4.410.0130.03615.94
5.4.400.0100.03615.75
5.4.390.0110.03915.95
5.4.380.0110.04115.88
5.4.370.0090.03915.83
5.4.360.0100.04515.85
5.4.350.0080.02815.98
5.4.340.0080.02615.90
5.4.330.0130.00612.69
5.4.320.0090.04415.76
5.4.310.0150.03015.77
5.4.300.0120.01915.83
5.4.290.0110.04015.73
5.4.280.0110.04015.86
5.4.270.0110.03515.85
5.4.260.0080.04915.91
5.4.250.0020.04515.74
5.4.240.0050.04115.93
5.4.230.0070.04615.76
5.4.220.0130.03515.84
5.4.210.0060.03915.74
5.4.200.0060.04315.74
5.4.190.0100.04215.82
5.4.180.0090.02715.85
5.4.170.0090.03215.72
5.4.160.0110.01815.92
5.4.150.0120.04015.82
5.4.140.0030.04214.52
5.4.130.0040.04414.56
5.4.120.0080.04014.60
5.4.110.0070.04114.59
5.4.100.0120.03914.57
5.4.90.0060.02414.51
5.4.80.0080.04114.57
5.4.70.0150.02014.59
5.4.60.0000.02814.57
5.4.50.0110.02214.41
5.4.40.0110.03214.58
5.4.30.0120.02514.63
5.4.20.0100.03714.51
5.4.10.0100.04114.45
5.4.00.0100.03814.23
5.3.290.0150.03614.00
5.3.280.0080.03013.90
5.3.270.0110.03713.94
5.3.260.0070.04213.92
5.3.250.0080.04114.00
5.3.240.0070.04313.79
5.3.230.0050.04413.95
5.3.220.0050.04013.82
5.3.210.0100.04113.76
5.3.200.0090.02513.83
5.3.190.0090.02613.82
5.3.180.0060.04113.91
5.3.170.0080.03113.92
5.3.160.0210.02613.86
5.3.150.0070.04113.97
5.3.140.0160.03713.88
5.3.130.0090.04513.81
5.3.120.0110.04013.87
5.3.110.0100.03713.83
5.3.100.0110.04013.59
5.3.90.0080.04013.56
5.3.80.0080.04213.60
5.3.70.0150.03613.62
5.3.60.0070.04513.60
5.3.50.0080.04213.49
5.3.40.0100.03213.50
5.3.30.0100.03313.62
5.3.20.0080.04013.36
5.3.10.0080.03913.35
5.3.00.0100.03813.26
5.2.170.0070.03411.60
5.2.160.0110.02811.40
5.2.150.0020.03711.36
5.2.140.0070.02711.48
5.2.130.0020.02711.46
5.2.120.0060.03211.45
5.2.110.0080.03011.35
5.2.100.0110.03011.44
5.2.90.0140.02611.31
5.2.80.0060.02311.42
5.2.70.0080.03211.36
5.2.60.0030.03711.41
5.2.50.0050.03511.21
5.2.40.0090.03011.34
5.2.30.0030.03211.34
5.2.20.0080.02711.24
5.2.10.0060.03211.11
5.2.00.0080.03111.04
5.1.60.0040.02210.45
5.1.50.0070.02510.53
5.1.40.0080.02110.50
5.1.30.0060.02910.70
5.1.20.0050.03110.77
5.1.10.0060.02510.37
5.1.00.0080.02810.47
5.0.50.0170.0179.38
5.0.40.0040.0209.30
5.0.30.0030.0209.20
5.0.20.0020.0219.11
5.0.10.0070.0109.20
5.0.00.0040.0329.18
4.4.90.0070.0158.80
4.4.80.0050.0178.80
4.4.70.0060.0178.80
4.4.60.0020.0218.80
4.4.50.0030.0168.80
4.4.40.0030.0278.80
4.4.30.0050.0168.80
4.4.20.0030.0188.80
4.4.10.0030.0138.80
4.4.00.0050.0278.80
4.3.110.0030.0108.80
4.3.100.0030.0178.80
4.3.90.0030.0108.80
4.3.80.0050.0258.80
4.3.70.0060.0158.80
4.3.60.0050.0188.80
4.3.50.0010.0188.80
4.3.40.0030.0238.80
4.3.30.0030.0138.80
4.3.20.0030.0188.80
4.3.10.0000.0238.80
4.3.00.0050.0168.80

preferences:
52.78 ms | 404 KiB | 6 Q