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'];$cc[]=$v['count']; $new['date']=$v["count"]; }print_r($new); print_r(array_combine($date,$new)); //foreach($new as $k =>$v){ foreach($date as $k2 =>$v2 ){ if(!array_key_exists($v2,$new)){$new[$k2]=0;} }print_r($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.0160.00318.55
8.3.50.0090.01217.89
8.3.40.0070.01118.57
8.3.30.0130.00918.77
8.3.20.0040.00420.16
8.3.10.0000.00822.09
8.3.00.0070.00022.37
8.2.180.0040.01116.50
8.2.170.0130.00322.96
8.2.160.0110.00720.93
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0030.00517.59
8.2.110.0060.00320.91
8.2.100.0080.00317.91
8.2.90.0040.00419.20
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0080.00018.28
8.2.30.0000.00718.01
8.2.20.0000.00717.70
8.2.10.0000.00817.87
8.2.00.0000.00717.71
8.1.270.0000.00822.08
8.1.260.0040.00426.35
8.1.250.0040.01128.09
8.1.240.0090.00022.65
8.1.230.0060.00617.77
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0050.00318.64
8.1.160.0040.00422.00
8.1.150.0030.00518.58
8.1.140.0040.00417.45
8.1.130.0080.00017.81
8.1.120.0040.00417.48
8.1.110.0070.00017.36
8.1.100.0000.00717.34
8.1.90.0070.00017.32
8.1.80.0000.00717.39
8.1.70.0000.00717.42
8.1.60.0040.00417.59
8.1.50.0040.00417.51
8.1.40.0080.00017.54
8.1.30.0040.00417.67
8.1.20.0050.00317.58
8.1.10.0030.00617.56
8.1.00.0000.00717.46
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0050.00318.37
8.0.270.0070.00017.24
8.0.260.0060.00016.78
8.0.250.0030.00316.98
8.0.240.0040.00417.01
8.0.230.0080.00017.05
8.0.220.0070.00016.84
8.0.210.0000.00816.83
8.0.200.0000.00616.89
8.0.190.0040.00417.02
8.0.180.0040.00416.98
8.0.170.0060.00316.95
8.0.160.0030.00616.84
8.0.150.0000.00916.90
8.0.140.0000.00716.91
8.0.130.0030.00313.34
8.0.120.0030.00616.96
8.0.110.0080.00016.98
8.0.100.0070.00016.82
8.0.90.0040.00416.82
8.0.80.0040.01116.91
8.0.70.0000.00717.01
8.0.60.0070.00017.05
8.0.50.0000.00716.79
8.0.30.0060.01316.99
8.0.20.0080.01117.40
8.0.10.0040.00417.01
8.0.00.0080.01316.84
7.4.330.0000.00515.02
7.4.320.0060.00016.56
7.4.300.0050.00216.59
7.4.290.0030.00316.49
7.4.280.0070.00016.50
7.4.270.0030.00316.59
7.4.260.0050.00316.50
7.4.250.0070.00016.55
7.4.240.0030.00516.52
7.4.230.0070.00016.40
7.4.220.0180.00316.64
7.4.210.0100.00616.52
7.4.200.0070.00016.53
7.4.190.0030.00316.57
7.4.160.0080.00816.65
7.4.150.0140.00317.40
7.4.140.0070.01117.86
7.4.130.0100.01016.57
7.4.120.0070.01016.54
7.4.110.0160.00416.72
7.4.100.0090.01216.57
7.4.90.0040.01216.50
7.4.80.0150.00719.39
7.4.70.0110.00516.64
7.4.60.0090.00916.42
7.4.50.0040.00416.11
7.4.40.0040.01522.77
7.4.30.0030.01316.66
7.4.00.0060.00614.81
7.3.330.0050.00013.32
7.3.320.0030.00313.23
7.3.310.0070.00016.44
7.3.300.0030.00316.37
7.3.290.0130.00016.39
7.3.280.0070.01116.40
7.3.270.0170.00017.40
7.3.260.0070.01016.60
7.3.250.0130.00316.61
7.3.240.0030.01316.34
7.3.230.0060.01116.51
7.3.210.0200.00316.54
7.3.200.0140.00319.39
7.3.190.0180.00316.59
7.3.180.0100.00616.55
7.3.170.0090.01316.43
7.3.160.0060.01016.60
7.3.120.0080.00714.60
7.3.110.0100.00315.07
7.3.100.0030.00714.80
7.3.90.0070.00714.91
7.3.80.0040.00714.71
7.3.70.0040.00814.61
7.3.60.0030.01314.80
7.3.50.0070.00714.87
7.3.40.0000.01514.81
7.3.30.0000.01614.90
7.3.20.0070.01016.77
7.3.10.0080.00416.32
7.3.00.0060.00916.50
7.2.330.0060.01016.62
7.2.320.0080.01016.52
7.2.310.0130.00616.50
7.2.300.0030.01716.82
7.2.290.0000.01716.77
7.2.240.0090.00015.15
7.2.230.0030.01415.04
7.2.220.0070.01015.04
7.2.210.0080.00414.97
7.2.200.0030.00915.05
7.2.190.0060.00614.71
7.2.180.0120.00315.07
7.2.170.0070.00314.72
7.2.160.0070.00415.10
7.2.150.0070.00716.82
7.2.140.0040.01116.92
7.2.130.0040.00816.89
7.2.120.0040.01417.11
7.2.110.0060.00616.96
7.2.100.0090.00616.80
7.2.90.0090.00616.48
7.2.80.0040.01116.71
7.2.70.0000.01616.60
7.2.60.0060.00616.80
7.2.50.0070.00716.82
7.2.40.0090.00616.98
7.2.30.0090.00616.88
7.2.20.0070.00716.66
7.2.10.0070.01116.99
7.2.00.0070.00718.19
7.1.330.0070.00715.87
7.1.320.0100.00315.87
7.1.310.0000.01515.40
7.1.300.0100.00315.73
7.1.290.0070.00715.77
7.1.280.0120.00315.55
7.1.270.0030.01015.54
7.1.260.0040.00715.57
7.1.250.0040.01115.48
7.1.100.0040.00718.05
7.1.70.0040.00417.18
7.1.60.0120.01219.82
7.1.50.0070.01916.68
7.1.00.0070.07022.31
7.0.200.0090.00016.92
7.0.140.0030.07722.08
7.0.60.0030.09019.79
7.0.50.0000.04717.84
7.0.40.0130.07720.15
7.0.30.0230.05020.10
7.0.20.0230.06320.26
7.0.10.0330.07720.12
7.0.00.0100.05020.25
5.6.280.0100.07020.91
5.6.210.0000.04320.54
5.6.200.0100.03718.18
5.6.190.0170.08020.69
5.6.180.3070.04720.57
5.6.170.0270.04020.50
5.6.160.0070.04020.50
5.6.150.0030.04018.23
5.6.140.0070.03718.21
5.6.130.0070.03718.22
5.6.120.0070.06320.99
5.6.110.0100.09020.96
5.6.100.0170.05721.09
5.6.90.0100.06021.11
5.6.80.0070.06320.43
5.6.70.0330.07320.51
5.5.350.0030.03720.45
5.5.340.0100.05318.02
5.5.330.0130.07020.59
5.5.320.0170.04720.41
5.5.310.0300.07320.33
5.5.300.0070.06717.98
5.5.290.0030.06717.98
5.5.280.0100.06720.89
5.5.270.0000.04720.76
5.5.260.0030.04720.96
5.5.250.0030.07720.59
5.5.240.0130.05720.19
5.4.450.0230.07019.55
5.4.440.0430.05719.46
5.4.430.0530.06319.48
5.4.420.0530.07719.58
5.4.410.0470.05019.34
5.4.400.0130.04718.55
5.4.390.0030.06018.76
5.4.380.0270.05318.73
5.4.370.0200.05318.59
5.4.360.0170.05718.69
5.4.350.0270.05018.59
5.4.340.0270.05718.49
5.4.320.0130.03212.50
5.4.310.0060.04812.50
5.4.300.0070.03712.50
5.4.290.0130.03312.50
5.4.280.0090.04112.39
5.4.270.0100.06318.94
5.4.260.0130.05319.02
5.4.250.0200.06719.02
5.4.240.0270.05318.94
5.4.230.0130.06019.01
5.4.220.0230.05318.81
5.4.210.0200.06319.06
5.4.200.0200.05319.06
5.4.190.0130.08018.89
5.4.180.0230.06318.87
5.4.170.0070.06018.93
5.4.160.0170.08018.94
5.4.150.0270.06319.09
5.4.140.0100.07716.62
5.4.130.0200.05016.39
5.4.120.0170.05316.53
5.4.110.0230.05016.71
5.4.100.0130.05016.64
5.4.90.0000.07316.52
5.4.80.0100.05316.46
5.4.70.0170.06316.62
5.4.60.0200.05316.65
5.4.50.0100.05016.54
5.4.40.0200.05016.70
5.4.30.0000.08016.65
5.4.20.0200.04716.40
5.4.10.0170.04716.59
5.4.00.0130.05316.10
5.3.290.0080.03912.80
5.3.280.0030.06314.66
5.3.270.0100.06714.82
5.3.260.0000.06314.67
5.3.250.0170.06714.93
5.3.240.0130.06014.80
5.3.230.0030.06314.80
5.3.220.0100.05314.64
5.3.210.0170.06714.81
5.3.200.0200.06314.64
5.3.190.0070.06314.64
5.3.180.0170.05014.66
5.3.170.0200.04314.63
5.3.160.0130.04714.87
5.3.150.0200.07014.88
5.3.140.0130.05014.86
5.3.130.0100.06314.63
5.3.120.0170.07314.79
5.3.110.0170.05314.76
5.3.100.0230.04714.34
5.3.90.0170.07014.30
5.3.80.0070.07314.24
5.3.70.0130.05714.32
5.3.60.0170.05014.28
5.3.50.0170.04714.18
5.3.40.0070.06714.18
5.3.30.0130.05714.11
5.3.20.0200.05013.92
5.3.10.0130.04713.72
5.3.00.0200.05313.94
5.2.170.0170.04711.34
5.2.160.0300.03711.46
5.2.150.0230.04711.18
5.2.140.0130.03711.37
5.2.130.0130.05311.34
5.2.120.0170.03011.33
5.2.110.0130.05011.41
5.2.100.0070.04311.17
5.2.90.0100.04311.18
5.2.80.0200.03311.32
5.2.70.0130.03711.32
5.2.60.0130.04011.20
5.2.50.0070.04711.16
5.2.40.0100.04311.31
5.2.30.0170.04011.19
5.2.20.0070.04711.03
5.2.10.0170.05011.05
5.2.00.0130.03710.96
5.1.60.0170.02710.24
5.1.50.0170.03710.30
5.1.40.0200.03010.15
5.1.30.0100.03710.34
5.1.20.0100.04010.42
5.1.10.0070.04310.30
5.1.00.0130.04310.31
5.0.50.0170.0338.86
5.0.40.0100.0338.75
5.0.30.0200.0508.24
5.0.20.0100.0308.50
5.0.10.0000.0308.18
5.0.00.0100.0438.39
4.4.90.0000.0337.63
4.4.80.0000.0237.63
4.4.70.0000.0277.63
4.4.60.0000.0277.63
4.4.50.0000.0237.63
4.4.40.0070.0337.63
4.4.30.0030.0237.63
4.4.20.0070.0307.63
4.4.10.0030.0307.63
4.4.00.0100.0377.63
4.3.110.0030.0277.63
4.3.100.0070.0237.63
4.3.90.0070.0177.63
4.3.80.0000.0377.63
4.3.70.0000.0237.63
4.3.60.0000.0237.63
4.3.50.0070.0277.63
4.3.40.0130.0337.63
4.3.30.0130.0207.63
4.3.20.0070.0307.63
4.3.10.0030.0277.63
4.3.00.0030.0276.29

preferences:
66.91 ms | 400 KiB | 5 Q