3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array( array("count"=>10,"date"=>"2014-04-16"), array("count"=>50,"date"=>"2014-04-18"), array("count"=>80,"date"=>"2014-04-20") ); $date =array("2014-04-16","2014-04-17","2014-04-18","2014-04-19","2014-04-20"); foreach($arr as $k =>$v ){ //if(!array_key_exists($v['date'],$date)){ // $arr[]=array("count"=>0,"date"=>$date) //} $tt[]=$v['date']; $new['date']=$v["count"]; } print_r(array_merge($date,$new)); foreach($arr as $k2 =>$v2 ){foreach($date as $k =>$v ){ if(!array_key_exists($v,$tt)){ $arr[]=array("count"=>0,"date"=>$v); } } } print_r($arr); //对应$date所有日期转换为 $arr=array( array("count"=>10,"date"=>"2014-04-16"), array("count"=>0,"date"=>"2014-04-17"), array("count"=>50,"date"=>"2014-04-18"), array("count"=>0,"date"=>"2014-04-19"), array("count"=>80,"date"=>"2014-04-20") );

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.0110.00418.43
8.3.50.0170.01021.92
8.3.40.0110.00418.81
8.3.30.0110.00419.13
8.3.20.0060.00320.29
8.3.10.0040.00421.97
8.3.00.0040.00422.51
8.2.180.0160.00316.50
8.2.170.0060.01222.96
8.2.160.0070.00721.02
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00417.50
8.2.110.0060.00322.15
8.2.100.0110.00019.58
8.2.90.0040.00419.28
8.2.80.0030.00618.04
8.2.70.0000.00917.75
8.2.60.0080.00017.93
8.2.50.0030.00518.07
8.2.40.0000.00818.28
8.2.30.0040.00418.14
8.2.20.0000.00817.64
8.2.10.0040.00419.41
8.2.00.0040.00417.83
8.1.280.0120.00625.92
8.1.270.0070.00022.14
8.1.260.0150.00326.35
8.1.250.0070.00028.09
8.1.240.0040.00423.84
8.1.230.0090.00318.99
8.1.220.0050.00317.75
8.1.210.0030.00518.77
8.1.200.0040.00417.38
8.1.190.0000.00717.41
8.1.180.0000.00818.10
8.1.170.0000.00818.57
8.1.160.0000.00821.97
8.1.150.0050.00318.68
8.1.140.0000.00717.48
8.1.130.0080.00017.77
8.1.120.0040.00417.50
8.1.110.0070.00017.45
8.1.100.0040.00417.36
8.1.90.0040.00417.52
8.1.80.0070.00017.35
8.1.70.0000.00717.46
8.1.60.0030.00717.54
8.1.50.0000.00717.55
8.1.40.0030.00617.43
8.1.30.0000.00717.69
8.1.20.0000.00817.57
8.1.10.0000.00717.45
8.1.00.0030.00517.44
8.0.300.0070.00018.77
8.0.290.0040.00417.15
8.0.280.0030.00318.48
8.0.270.0030.00317.32
8.0.260.0030.00316.91
8.0.250.0000.00816.84
8.0.240.0040.00416.99
8.0.230.0030.00316.92
8.0.220.0030.00316.95
8.0.210.0040.00416.82
8.0.200.0030.00317.03
8.0.190.0040.00416.87
8.0.180.0000.00816.95
8.0.170.0000.00716.93
8.0.160.0040.00416.78
8.0.150.0070.00016.91
8.0.140.0000.00716.75
8.0.130.0060.00013.38
8.0.120.0040.00416.81
8.0.110.0040.00416.94
8.0.100.0000.00816.87
8.0.90.0070.00016.94
8.0.80.0060.01016.98
8.0.70.0050.00316.78
8.0.60.0040.00417.04
8.0.50.0030.00516.96
8.0.30.0100.01317.20
8.0.20.0110.00817.40
8.0.10.0040.00417.01
8.0.00.0080.01116.65
7.4.330.0040.00415.00
7.4.320.0000.00616.44
7.4.300.0070.00016.63
7.4.290.0040.00416.45
7.4.280.0000.00716.63
7.4.270.0040.00316.61
7.4.260.0030.00316.56
7.4.250.0040.00416.57
7.4.240.0020.00516.59
7.4.230.0030.00316.73
7.4.220.0060.01416.65
7.4.210.0040.01016.53
7.4.200.0070.00016.47
7.4.190.0050.00316.73
7.4.160.0100.00616.46
7.4.150.0000.01617.40
7.4.140.0110.00717.86
7.4.130.0170.00516.39
7.4.120.0100.01016.51
7.4.110.0030.01316.33
7.4.100.0100.00716.42
7.4.90.0130.00916.53
7.4.80.0070.01019.39
7.4.70.0060.01316.44
7.4.60.0120.00616.52
7.4.50.0040.00416.59
7.4.40.0000.01822.77
7.4.30.0070.01016.60
7.4.10.0110.00714.60
7.4.00.0090.00715.00
7.3.330.0040.00413.22
7.3.320.0030.00313.28
7.3.310.0000.00716.30
7.3.300.0000.00716.39
7.3.290.0110.00316.31
7.3.280.0130.00216.35
7.3.270.0170.00717.40
7.3.260.0040.01316.34
7.3.250.0050.01216.47
7.3.240.0040.01416.34
7.3.230.0120.00916.70
7.3.210.0070.01416.27
7.3.200.0100.00719.39
7.3.190.0150.00616.61
7.3.180.0120.00416.37
7.3.170.0080.01516.41
7.3.160.0120.00916.66
7.3.130.0040.01114.87
7.3.120.0120.00314.82
7.3.110.0150.00314.81
7.3.100.0070.00714.92
7.3.90.0090.00314.91
7.3.80.0040.00714.65
7.3.70.0000.01714.86
7.3.60.0060.00614.72
7.3.50.0090.00614.76
7.3.40.0080.00014.90
7.3.30.0030.01014.88
7.3.20.0060.00916.77
7.3.10.0130.00316.57
7.3.00.0000.01316.54
7.2.330.0050.01316.86
7.2.320.0110.01116.66
7.2.310.0060.01216.58
7.2.300.0070.01016.60
7.2.290.0030.01716.59
7.2.260.0100.01014.98
7.2.250.0040.01514.84
7.2.240.0100.00714.82
7.2.230.0100.00715.29
7.2.220.0060.00614.73
7.2.210.0030.01015.10
7.2.200.0030.00615.08
7.2.190.0070.01014.81
7.2.180.0070.01015.25
7.2.170.0080.00415.24
7.2.160.0100.00315.20
7.2.150.0130.00317.13
7.2.140.0080.00317.16
7.2.130.0030.00817.14
7.2.120.0030.01316.79
7.2.110.0090.00616.85
7.2.100.0070.00716.89
7.2.90.0040.01116.79
7.2.80.0030.00717.12
7.2.70.0070.00716.99
7.2.60.0030.01416.82
7.2.50.0040.01416.81
7.2.40.0040.00816.79
7.2.30.0150.00317.09
7.2.20.0080.01117.08
7.2.10.0060.01017.02
7.2.00.0090.00418.13
7.1.330.0000.01315.85
7.1.320.0090.00615.68
7.1.310.0090.00315.95
7.1.300.0070.01015.55
7.1.290.0000.01115.55
7.1.280.0030.00715.80
7.1.270.0060.00615.74
7.1.260.0110.00315.86
7.1.250.0070.00715.54
7.1.240.0030.01215.99
7.1.230.0030.00615.73
7.1.220.0100.00315.76
7.1.210.0030.01015.86
7.1.200.0050.00615.90
7.1.190.0040.00715.64
7.1.180.0040.01115.89
7.1.170.0030.01315.87
7.1.160.0040.01115.79
7.1.150.0090.00615.66
7.1.140.0100.00715.65
7.1.130.0030.01015.72
7.1.120.0140.00015.54
7.1.110.0100.00015.99
7.1.100.0030.00916.78
7.1.90.0030.01015.94
7.1.80.0000.01415.81
7.1.70.0020.00916.32
7.1.60.0100.00817.89
7.1.50.0030.01016.28
7.1.40.0060.00615.87
7.1.30.0030.00615.76
7.1.20.0040.00815.54
7.1.10.0000.01115.74
7.1.00.0060.03819.09
7.0.330.0060.00615.38
7.0.320.0030.01215.36
7.0.310.0100.00315.50
7.0.300.0100.00315.13
7.0.290.0140.00015.30
7.0.280.0070.01315.22
7.0.270.0060.00315.23
7.0.260.0130.00315.53
7.0.250.0040.00815.52
7.0.240.0030.00615.38
7.0.230.0060.01015.32
7.0.220.0040.01215.48
7.0.210.0090.00015.14
7.0.200.0100.00316.06
7.0.190.0030.01515.58
7.0.180.0090.00615.45
7.0.170.0090.00015.54
7.0.160.0070.00715.22
7.0.150.0040.00715.48
7.0.140.0020.04118.67
7.0.130.0070.00715.59
7.0.120.0030.00715.25
7.0.110.0000.00915.32
7.0.100.0000.01415.23
7.0.90.0130.00015.38
7.0.80.0080.00815.57
7.0.70.0130.00015.28
7.0.60.0150.04017.68
7.0.50.0040.02616.74
7.0.40.0130.03516.92
7.0.30.0120.04116.91
7.0.20.0220.03516.95
7.0.10.0050.02616.85
7.0.00.0150.03716.75
5.6.400.0070.00414.48
5.6.390.0090.00614.72
5.6.380.0030.01014.34
5.6.370.0050.00514.20
5.6.360.0110.00314.46
5.6.350.0000.01314.40
5.6.340.0060.01214.50
5.6.330.0060.00314.48
5.6.320.0120.00014.56
5.6.310.0130.00014.25
5.6.300.0060.01014.36
5.6.290.0060.00614.39
5.6.280.0110.03617.76
5.6.270.0030.00614.31
5.6.260.0040.01114.87
5.6.250.0060.00914.78
5.6.240.0030.00914.25
5.6.230.0100.00014.52
5.6.220.0030.00714.41
5.6.210.0170.02817.41
5.6.200.0050.04316.35
5.6.190.0100.02817.63
5.6.180.0120.04617.53
5.6.170.0200.03617.56
5.6.160.0080.04317.38
5.6.150.0020.04716.25
5.6.140.0100.04016.43
5.6.130.0110.04216.32
5.6.120.0100.04517.69
5.6.110.0080.04117.71
5.6.100.0070.03217.63
5.6.90.0060.04717.75
5.6.80.0080.03117.39
5.6.70.0140.00314.50
5.6.60.0070.00714.50
5.6.50.0030.01014.09
5.6.40.0090.00314.71
5.6.30.0100.00714.14
5.6.20.0040.00714.12
5.6.10.0100.00714.50
5.6.00.0040.01414.37
5.5.380.0030.01014.54
5.5.370.0060.00614.70
5.5.360.0060.00614.20
5.5.350.2190.02817.42
5.5.340.0070.04316.29
5.5.330.0060.03817.26
5.5.320.0390.03517.22
5.5.310.0220.02417.32
5.5.300.0100.03716.13
5.5.290.0090.04216.23
5.5.280.0080.03117.79
5.5.270.0120.02517.57
5.5.260.0090.03917.61
5.5.250.0030.03617.44
5.5.240.0050.04617.31
5.5.230.0030.01914.30
5.5.220.0140.00714.26
5.5.210.0110.00814.14
5.5.200.0030.02014.51
5.5.190.0100.01314.14
5.5.180.0000.01814.31
5.5.170.0130.00714.28
5.5.160.0070.01314.56
5.5.150.0110.00414.20
5.5.140.0030.01214.36
5.5.130.0070.01114.11
5.5.120.0030.01314.32
5.5.110.0090.01214.14
5.5.100.0060.00914.25
5.5.90.0030.01414.28
5.5.80.0030.01014.33
5.5.70.0030.01014.16
5.5.60.0160.00014.41
5.5.50.0130.00313.90
5.5.40.0040.00814.24
5.5.30.0040.00814.71
5.5.20.0060.00914.27
5.5.10.0150.00014.23
5.5.00.0030.01314.24
5.4.450.0220.01815.24
5.4.440.0130.04715.38
5.4.430.0150.03715.38
5.4.420.0150.04515.45
5.4.410.0130.04515.05
5.4.400.0110.04115.18
5.4.390.0110.03115.17
5.4.380.0170.02414.96
5.4.370.0180.03515.00
5.4.360.0180.03715.05
5.4.350.0160.02015.08
5.4.340.0110.02515.18
5.4.330.0040.00811.23
5.4.320.0180.01815.16
5.4.310.0140.04015.24
5.4.300.0160.03715.29
5.4.290.0110.02115.17
5.4.280.0190.03415.02
5.4.270.0220.03215.05
5.4.260.0140.04315.02
5.4.250.0140.04115.19
5.4.240.0140.03215.00
5.4.230.0140.02515.28
5.4.220.0120.02315.15
5.4.210.0160.02515.15
5.4.200.0130.02315.02
5.4.190.0180.02514.96
5.4.180.0110.02315.01
5.4.170.0170.01714.94
5.4.160.0120.04315.02
5.4.150.0190.03715.03
5.4.140.0210.03613.83
5.4.130.0130.04013.70
5.4.120.0160.03813.82
5.4.110.0170.03813.97
5.4.100.0170.04013.97
5.4.90.0120.02713.91
5.4.80.0170.03813.73
5.4.70.0140.02713.85
5.4.60.0180.01713.67
5.4.50.0120.01813.72
5.4.40.0200.03713.86
5.4.30.0170.02713.84
5.4.20.0100.02813.84
5.4.10.0160.02313.86
5.4.00.0220.03513.37
5.3.290.0150.03312.79
5.3.280.0190.04112.75
5.3.270.0190.03612.61
5.3.260.0170.03312.67
5.3.250.0190.03312.68
5.3.240.0140.02512.64
5.3.230.0120.04112.67
5.3.220.0100.02712.66
5.3.210.0130.03912.63
5.3.200.0150.02612.67
5.3.190.0120.02712.67
5.3.180.0120.02712.67
5.3.170.0160.03812.62
5.3.160.0100.02912.61
5.3.150.0120.02512.63
5.3.140.0190.03712.66
5.3.130.0180.03312.72
5.3.120.0150.03612.61
5.3.110.0130.02812.65
5.3.100.0120.03012.39
5.3.90.0150.01712.38
5.3.80.0150.02012.40
5.3.70.0090.02412.32
5.3.60.0150.02412.30
5.3.50.0130.01812.29
5.3.40.0120.01912.39
5.3.30.0120.02012.27
5.3.20.0090.02012.25
5.3.10.0100.02012.25
5.3.00.0130.01812.11
5.2.170.0170.04012.38
5.2.160.0100.03012.38
5.2.150.0070.03712.39
5.2.140.0200.03712.39
5.2.130.0130.02712.39
5.2.120.0170.02312.43
5.2.110.0170.02712.43
5.2.100.0130.02712.43
5.2.90.0030.03712.43
5.2.80.0230.05312.43
5.2.70.0200.04012.43
5.2.60.0130.02712.43
5.2.50.0100.06312.43
5.2.40.0130.03312.43
5.2.30.0100.03012.43
5.2.20.0170.03312.43
5.2.10.0130.03012.44
5.2.00.0130.06012.46
5.1.60.0100.03712.46
5.1.50.0130.05312.46
5.1.40.0130.03712.50
5.1.30.0100.03312.51
5.1.20.0100.02712.53
5.1.10.0200.02012.54
5.1.00.0230.03012.56
5.0.50.0030.03012.56
5.0.40.0030.02012.57
5.0.30.0000.04312.57
5.0.20.0030.02012.59
5.0.10.0030.02312.59
5.0.00.0030.03312.61
4.4.90.0030.01712.62
4.4.80.0070.01712.64
4.4.70.0070.01312.64
4.4.60.0070.01312.64
4.4.50.0030.01712.64
4.4.40.0030.02712.64
4.4.30.0000.02012.64
4.4.20.0030.01712.64
4.4.10.0100.01312.64
4.4.00.0030.02712.64
4.3.110.0100.01312.64
4.3.100.0070.01312.64
4.3.90.0070.01312.64
4.3.80.0070.02312.64
4.3.70.0070.01712.64
4.3.60.0030.01712.64
4.3.50.0030.01712.64
4.3.40.0070.02312.64
4.3.30.0030.01712.64
4.3.20.0030.01312.64
4.3.10.0000.01712.64
4.3.00.0000.01712.64

preferences:
39.47 ms | 401 KiB | 5 Q